i have a problem with li and ul

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

Moderator: General Moderators

i have a problem with li and ul

Postby mekha » Mon Jul 16, 2012 7:56 am

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 ?
mekha
Forum Contributor
 
Posts: 112
Joined: Sat Mar 31, 2012 6:50 am

Re: i have a problem with li and ul

Postby tr0gd0rr » Mon Jul 16, 2012 2:41 pm

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


Return to HTML, CSS and other UI Design Technologies

Who is online

Users browsing this forum: No registered users and 7 guests