Simple grid layout

Developer
Size
1,978 Kb
Views
18,216

How do I make an simple grid layout?

Very simple grid layout using display table and table-cell. splits the row into even parts . What is a simple grid layout? How do you make a simple grid layout? This script and codes were developed by Nick Nikolov on 17 October 2022, Monday.

Simple grid layout Previews

Simple grid layout - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple grid layout</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ html,
body { margin: 0px; padding: 0px; font-family: Roboto, Arial, sans-serif; background: #fff;
}
div.row { display: table; table-layout: fixed; width: 100%; box-sizing: border-box; border-spacing: 20px 10px;
}
div.col { display: table-cell; vertical-align: top;
}
img { max-width: 100%; display: block;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="row"> <div class="col"><img src="http://lorempixel.com/1200/300/?1" /></div>
</div>
<div class="row"> <div class="col"><img src="http://lorempixel.com/400/200/?1" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?2" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?3" /></div>
</div>
<div class="row"> <div class="col"><img src="http://lorempixel.com/400/200/?1" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?2" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?3" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?4" /></div>
</div>
<div class="row"> <div class="col"><img src="http://lorempixel.com/400/200/?1" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?2" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?3" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?4" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?5" /></div>
</div>
<div class="row"> <div class="col"><img src="http://lorempixel.com/400/200/?1" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?2" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?3" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?4" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?5" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?6" /></div>
</div>
<div class="row"> <div class="col"><img src="http://lorempixel.com/400/200/?1" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?2" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?3" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?4" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?5" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?6" /></div> <div class="col"><img src="http://lorempixel.com/400/200/?7" /></div>
</div>
</body>
</html>

Simple grid layout - Script Codes CSS Codes

html,
body { margin: 0px; padding: 0px; font-family: Roboto, Arial, sans-serif; background: #fff;
}
div.row { display: table; table-layout: fixed; width: 100%; box-sizing: border-box; border-spacing: 20px 10px;
}
div.col { display: table-cell; vertical-align: top;
}
img { max-width: 100%; display: block;
}
Simple grid layout - Script Codes
Simple grid layout - Script Codes
Home Page Home
Developer Nick Nikolov
Username necks
Uploaded October 17, 2022
Rating 3
Size 1,978 Kb
Views 18,216
Do you need developer help for Simple grid layout?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Nick Nikolov (necks) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!