I am making a navigation bar and cant seem to figure out why my drop down menu options are stacked side by side instead of one on top of the other. Ive search and tried just about everything. Any suggestions?
http://jsfiddle.net/isherwood/rUsNr/
HTML markup:
<ul class="jsddm">
<li><a href="home">Home</a>
<li><a href="#">OS</a>
<ul>
<li><a href="#">Android</a></li>
<li><a href="#">iOS</a></li>
</ul>
</li>
<li><a href="#">Category</a>
<ul>
<li><a href="#">Category 1</a></li>
<li><a href="#">Category 2</a></li>
</ul>
</li>
<li><a href="#">Rating</a>
<ul>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
</ul>
</li>
<li><a href="login">Login</a></li>
<li><a href="register">Register</a></li>
</ul>
css
ul.jsddm
{
margin: 0;
padding: 0;
position: relative;
line-height: 1.5em;
}
ul.jsddm a
{
color: #FFF;
background-color: #333;
border: 1px solid #444;
display: block;
text-decoration: none;
text-align: center;
width: auto;
}
ul.jsddm a:hover
{
color: #000;
background-color: #FFF;
}
ul.jsddm li
{
position: relative;
float: left;
list-style: none;
width: 16%;
}
ul.jsddm ul
{
position: absolute;
width: 150px;
top: 25px;
padding: 0;
visibility: hidden;
}
I want to keep the width at 16% in ul.jsddm li part of the code (this was the bav bar shrinks for smaller screens.