Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #377

    Hi,

    the text of some of my sub-menus are rather long and I would like to show it in 1 line, but the theme put it in 2 lines, if the text is too long:

    http://i29.tinypic.com/rtdevn.jpg

    What can I change where, so that the width of the sub-menus is adapted to the length of the text in it (= 1 submenu in 1 line, no matter how long the text is)?

    Live: http://tinyurl.com/28ljgnp (–> menu “Second”)

    Thanks.

    #31120

    You need to make 2 CSS edits to fix this:

    Open up style.css and find this code (around line 391) and change the width:

    #top .catnav ul {
    display:none;
    left:-2px;
    position:absolute;
    top:74px;
    width:172px;
    }

    Find this code (around line 399) and change the width:

    #top .catnav li ul a  {
    float:left;
    height:auto;
    padding:0 10px;
    text-align:left;
    width:150px;
    }

    Whatever you add (in px) to the first code, add to the second one as well.

    I notice that at the moment you’re not using sub > sub navigation – if you do there is more code to change because one item will overlap the other.

    Let me know if you get stuck or anything goes wrong.

    #31121

    Works fine, thank you very much.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Flexible width for sub-menus, if the sub-menu text is longer’ is closed to new replies.