I want to make a CSS menu auto-justify full width.
HTML:
<nav class="menu">
<ul>
<li><a href="#">click</a></li>
<li><a href="#">click</a></li>
<li><a href="#">long clickclick</a></li>
<li><a href="#">click</a></li>
<li><a href="#">clickclickclick</a></li>
<li><a href="#">click click 666</a></li>
</ul>
</nav>
CSS:
.menu {
text-align: justify;
font-size: 0;
font-size: 14px\9; /* IE6-9 hack */
line-height: 0;
}
.menu:after {
content: '';
display: inline-block;
width: 100%;
height: 0;
zoom: 1;
*display: inline;
}
.menu ul {
list-style: none;
padding: 0;
margin: 0;
display: inline;
}
.menu ul li {
display: inline-block;
font-size: 14px;
zoom: 1;
*display: inline;
}
.menu ul li a {
line-height: 54px;
}
It working good on Chrome/Firefox, but not working on IE 10-11. Coud someone please help me fix this?
Do you mean you want to have the menu spread across the width of the page? In that case, adding
min-width:100%;
to.menu
in your CSS file will achieve that.