Skip to content

Instantly share code, notes, and snippets.

Created June 10, 2014 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1a1460cf195c058d180d to your computer and use it in GitHub Desktop.
Save anonymous/1a1460cf195c058d180d to your computer and use it in GitHub Desktop.
A Pen by Faye Polson.
<!DOCTYPE html>
<head>
<title>Justify Test</title>
<meta charset="UTF-8">
</head>
<body>
<div class="container">
<nav class="nav-justify">
<ul>
<li><a href="#">Link1</a></li>
<li><a href="#">Link2</a></li>
<li><a href="#">Link3</a></li>
<li><a href="#">Link4</a></li>
<li><a href="#">Link5</a></li>
</ul>
</nav>
</div>
</body>

Justified list menus

This allows you to justify your menu list perfectly. It's responsive. It doesn't work on Joomla! for some crazy mystery, please help if you know why!!

A Pen by Faye Polson on CodePen.

License.

body {
background:#eee;
}
.container {
background:white;
max-width:500px;
margin:0 auto;
}
.nav-justify ul {
list-style: none;
margin:0px;
padding:0px;
text-align:justify;
&:after {
content:" ";
display:inline-block;
width:100%;
height:0;
}
li {
display:inline-block;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment