Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Sub menu too narrow

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #238751
    dona70
    Participant

    I can’t get the submenu wide enough.
    The site:

    http://www.toivalanurheilijat.fi/uusi/

    I tried to change padding into this css:

    #main-nav li ul li {
    background-color: rgb(48, 48, 48);
    display: block;
    float: none;
    min-height: 26px;
    padding: 10px 10px 50px 20px;
    position: relative;
    width: 121px;

    The link texts go into two row, but I want sub menu so wide, that link text fits into one row.
    I hope you understand, what I mean :)

    #238752
    Shikkediel
    Participant

    Disregard this.

    #238753
    Paulie_D
    Member

    To start

    #main-nav li ul  {
    white-space:nowrap; /* add this */
    }
    

    This will force the submenu to take up as much space as it need regardless of the width of the parent li.

    #238759
    dona70
    Participant

    Thanks, but I all ready did this:

    #main-nav li ul {
    left: 0;
    line-height: 1.2em; /1.2em 17.28px/
    position: absolute;
    top: 100%;
    visibility: hidden;
    width: auto;
    }

    #main-nav li ul li {
    background-color: rgb(48, 48, 48);
    display: block;
    float: none;
    min-height: 26px;
    padding: 10px 10px 20px 20px;
    position: relative;
    }

    I put width: auto into #main-nav li ul and removed width: 121px from #main-nav li ul li

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.