Posted in templates
486
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
48
This Month
228
This Year
487

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
When I realized that, no individual step is hard in any process. Building this airport I'm standing in right now started with a guy writing the architectural plans on paper. That's not hard for him to do. Then laying the first beam isn't had. The whole thing is really hard. So, just take each step kind of piece by piece and when I was able to do that and stop trying to chase this prize and started putting in the work, things just started coming together.
Unknown
Random CSS Property

scaleX()

The scaleX() CSS function defines a transformation that resizes an element along the x-axis (horizontally). Its result is a <transform-function> data type.
scaleX() css reference