CSS grid system using justify

Developer
Size
2,626 Kb
Views
12,144

How do I make an css grid system using justify?

The principle is this: inline-block all list items (or any other type) inside a container with text-align: justify. Use an :after with width: 100% to force the list to stretch itself. Widths and other values are changeable, even from pixels to percentages. I call it a CSS grid system, as it is possibly a very powerful and clean way of defining a horizontal (evenly spread) list. Blog post will follow. http://code.jelmerdemaat.nl. What is a css grid system using justify? How do you make a css grid system using justify? This script and codes were developed by Jelmer on 02 December 2022, Friday.

CSS grid system using justify Previews

CSS grid system using justify - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS grid system using justify</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!--Change a few charaters in here and see it auto-arrange!-->
<ul> <li>Item 1</li> <li>Longer item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Number 5</li> <li>Item 6</li>
</ul> <script src="js/index.js"></script>
</body>
</html>

CSS grid system using justify - Script Codes CSS Codes

ul { text-align: justify; width: 600px; /* try to change this in x% and resize window! */ font-size: 0;
}
ul:after { content: " "; display: inline-block; width: 100%;
}
li { display: inline-block; font-size: 12px; /* width: 55px; /* you can play with this as well */ vertical-align: top;
}
/* --------------- */
/* Less important: */
ul { background: #ccc; margin: 50px auto; padding: 30px 0;
}
li { color: #eee; padding: 10px 20px; background: #333;
}
body { font-family: sans-serif; font-size: 12px;
}

CSS grid system using justify - Script Codes JS Codes

/*
CSS Justified grid system
By Jelmer de Maat
http://code.jelmerdemaat.nl
CSS grid system using justify - Script Codes
CSS grid system using justify - Script Codes
Home Page Home
Developer Jelmer
Username jelmerdemaat
Uploaded December 02, 2022
Rating 3
Size 2,626 Kb
Views 12,144
Do you need developer help for CSS grid system using justify?

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!

Jelmer (jelmerdemaat) Script Codes
Create amazing love letters 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!