Jump to content

My list item doesnt take up the full width


terryds
 Share

Recommended Posts

Hi,

Please look at http://jsfiddle.net/terryds/H3A4M/4/

 

When i mouse over the portfolio list item, then mouse over the wordpress theme, the second and third list item ('blue' and 'red') doesn't take up the full width. I mean, the first item's width is the same as its unordered list parent, but the second and the third's width isn't

 

Please tell me how to solve the problem and why that happens ?

Link to comment
Share on other sites

The first item IS NOT the same width as parent, all submenu widths is determined by text content, margins, padding.

 

You have to set a width for submenus ul that will accommodate the length of text, you could try min-width along with white-space: nowrap; also.

 

You will need to set width of submenu li to 100%, because as they are floated and there width is determine by content, if they can fit side by side with the width set for parent submenu ul they will do so.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...