help with clearing a float left
I have an unordered floated left that uses css hover menu. However, it's not clearing the next开发者_如何学Python unordered list after it. I've tried clear: both but it doesn't work. Any suggestions?
i tried using overflow auto on the div tag before, but that creates scrollbars.
The url is at: http://www.nvcc.edu/current-students/_militarydev/research/doctoral.html
i got it working using clearfix:after. how viable a solution is clearfix:after?
ul.topnav li ul.subnav { list-style: none; position: absolute; /--Important - Keeps subnav from affecting main navigation flow--/ left: 0; top: 35px; margin: 0; padding: 0; display: none; float: left; width: 190px; height: 350px; }
Clearfix is one of the better ways to do this you can read up on it here if you want. Aside from that you're probably safe if it looks like you want it in all browsers you need it to support.
Clearfix is good in most cases.
It is used and recommended by a lot of front-end professionals, look at html5 boilerplate which offers it as a standard style in their standard stylesheet.
精彩评论