Page 1 of 1

i have a problem with li and ul

Posted: Mon Jul 16, 2012 7:56 am
by mekha
hi guys, i have a div
his width is: 1014px;
now i want to put a list that have 7 elements and to stretch it to fit the div width....and i failed....can u help me please ?

Re: i have a problem with li and ul

Posted: Mon Jul 16, 2012 2:41 pm
by tr0gd0rr
ul and li elements are block elements and should extend 100% width by default. You can use Firebug or Web Inspector to find out if there is other CSS that is setting the width or floating the elements. If so, you can set width specifically to 100%.

Now if you are saying that you want the 7 items to spread horizontally like a top menu, you could float the li elements and set their width to 14.2% (100%/7).