PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Nov 27, 2014 7:08 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jul 16, 2012 7:56 am 
Offline
Forum Contributor

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


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 2:41 pm 
Offline
Forum Contributor
User avatar

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group