Posted in templates
539
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
37
This Month
25
This Year
540

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
I believe that in order to better your knowledge base, it takes a lot of failing in order to succeed. I don't consider anything a failure as long as you get back up and you learn from your own mistakes.
Unknown
Random CSS Property

border-inline-start

The border-inline-start CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet.
border-inline-start css reference