Posted in templates
616
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
67
This Month
102
This Year
617

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

“Make no mistake: This is not your diary. You are not letting it all hang out. You are picking and choosing every single word.”


Dani Shapiro
Random CSS Property

text-align-last

The text-align-last CSS property sets how the last line of a block or a line, right before a forced line break, is aligned.
text-align-last css reference