i have a problem with li and ul

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
mekha
Forum Contributor
Posts: 112
Joined: Sat Mar 31, 2012 6:50 am

i have a problem with li and ul

Post 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 ?
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: i have a problem with li and ul

Post 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).
Post Reply