Posted in templates
683
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
134
This Month
169
This Year
684

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
Even if you fall on your face, you're still moving forward.
Victor Kiam
Random CSS Property

radial-gradient()

The radial-gradient() CSS function creates an image consisting of a progressive transition between two or more colors that radiate from an origin. Its shape may be a circle or an ellipse. The function's result is an object of the <gradient> data type, which is a special kind of <image>.
radial-gradient() css reference