I am trying to create HTML / CSS for footer navigation.
What I would like to have is the main sections as separate ul, and then each subsection as li inside.
The ul will have a fixed height, and li will flow inside. If they donβt have enough space to go down, I would like them to start on the right side again.
I, although it would be quite simple, and tried it with the following HTML / CSS
<ul class="my_ul"> <li class="bold"> Home </li> </ul> <ul class="my_ul"> <li class="bold"> Catalogue </li> <li> Category 1 </li> <li> Category 2 </li> <li> Category 3 </li> <li> Category 4 </li> <li> Category 5 </li> </ul> <ul class="my_ul"> <li class="bold"> Company </li> <li> Company 1 </li> <li> Company 2 </li> <li> Company 3 </li> <li> Company 4 </li> <li> Company 5 </li> </ul> .my_ul { height: 130px; float: left; } .my_ul li { float: left; clear: left; list-style: none; }
The above works, except that when he gets to the bottom of ul, he continues to move. Obviously overflow: hidden makes it inefficient, but that is not what I want. I want him to start a new column on the right.
Any ideas how I can improve this?
Thanks,
Matt
source share