Posted in templates
676
2:50 am, February 5, 2024
 

4 box custom grid with responsive

simple 4 box 25% grid with a responsive break at 1024px to stack the boxes in the grid

HTML

<div class="grid-icons">
  <div class="grid-icon-box">
    grid item 1
  </div>
  <div class="grid-icon-box">grid item 2</div>
  <div class="grid-icon-box">grid item 3</div>
  <div class="grid-icon-box">grid item 4</div>
</div>

CSS

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;700&display=swap');
* { 
	box-sizing: border-box; 
	transition: all 0.2s; 
}
.open-sans {
	font-family:"Open Sans", sans-serif;
}
.grid-icons {
	font-family:"Open Sans", sans-serif;
	display: grid;
	grid-template-columns: 24% 24% 24% 25%;
	grid-template-rows: 100%;  
	grid-gap: 1%;
  color:#FFF;
}
.grid-icon-box {
	font-family:"Open Sans", sans-serif;
	width:99%;
	min-height:200px;
	padding:20px;
	text-align:center;
  	background:linear-gradient(purple,blue);
  border-radius:10px;
}
.grid-icon-box svg {
  display:inline-block;
}
@media(max-width:1024px) {
	.grid-icons {
      	display:block;
      	grid-template-columns: auto;
      	grid-template-columns: auto;
  	}  
    .grid-icon-box {
      grid-column: auto;
      grid-row: auto;
      margin-bottom:10px;
    }  
}
grid item 1
grid item 2
grid item 3
grid item 4

External Link for 4 box custom grid with responsive

View Statistics
This Week
127
This Month
162
This Year
677

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote


minecraft
Random CSS Property

appearance (-moz-appearance, -webkit-appearance)

The appearance CSS property is used to display an element using platform-native styling, based on the operating system's theme. The -moz-appearance and -webkit-appearance properties are non-standard versions of this property, used (respectively) by Gecko (Firefox) and by WebKit-based (e.g., Safari) and Blink-based (e.g., Chrome, Opera) browsers to achieve the same thing. Note that Firefox and Edge also support -webkit-appearance, for compatibility reasons.
appearance css reference