PDA

View Full Version : CSS Nav issue


m1a2x3x7
08-19-2008, 05:40 PM
Hey everyone. This is my first time creating a nav using a list. For some reason in IE it displays the list in a diagonal manor. Any help would be great.

CSS:
ul#nav{
list-style:none;
width:100%;
height:78px;
}
ul#nav li a{
display:block;
width:79px;
height:78px;
float:left;
}HTML:
<ul id="nav">
<li><a href=#>Hello</a></li>
<li><a href=#>About</a></li>
<li><a href=#>Services</a></li>
<li><a href=#>Work</a></li>
<li><a href=#>Contact</a></li>
</ul>Thanks
-M

domedia
08-19-2008, 05:48 PM
Don't float the anchor. They are alone inside the LI, so they have nothing to float next to.

Float the LI instead.

For many great examples, check this website:
http://css.maxdesign.com.au/listamatic/

m1a2x3x7
08-19-2008, 05:52 PM
hehe i was coming to say that. =)

Thanks dom

domedia
08-19-2008, 06:27 PM
Anytime Mr. Schultz :)