- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I had a question concerning floating a list to create navigation.
What are the advantages of floating the <a> vs. the <li>? I’ve seen it done both ways.
Thanks!
I suppose it depends on what kind of styling you are putting on it. Depending on the intended look, it might be better to have list items around them to more targeting. Also, with list items, they are much more manageable then just a bunch of links in a row.
This is the structure I’m referring to. I’ve seen the li is floated and I’ve also seen it when the a is floated.
<ul>
<li><a>Item1</a></li>
<li><a>Item2</a></li>
<li><a>Item3</a></li>
</ul>
I don’t think I’ve ever seen the <a> floated, actually.
Chris floats it in podcast #2.
Interesting, perhaps it just comes down to personal preference?