Posted By

smoothdzion on 02/08/10


css menu hover nowrap

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Hover Menu - No Wrap Submenu Items

 / Published in: CSS

When creating a drop-down menu/hover menu, the subitems will usually go as wide as the parent li. To make them go as wide as the value of their containing li you have to add a white-space: nowrap.

If you still run into issues you may have to make sure you've assigned display:block to the li that is wrapping also.

  1. ul li li{
  2. display: block;
  3. white-space: nowrap;
  4. }

Report this snippet  

You need to login to post a comment.