WordPress.org

Support

Support » Themes and Templates » [Resolved] CSS dropdown menu list problem

[Resolved] CSS dropdown menu list problem

  • Adam Blythe
    Member

    @adsleeblythe

    Hi,

    Simple query really and I’m looking for a simple answer!

    I want to make the container of the second level dropdown bigger so that the text within it runs on one line.

    Please see my image for a clearer explanation.

    I have noticed when using firebug each level in the list has the same css class which makes it hard to target ONLY my second level list.

    How can I change only the width of the second level menu? I am thinking I would have to create another css class right? But how do I implement this to affect the second level menu?

    See my page live.

    Any help will be much appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • esmi
    Forum Moderator

    @esmi

    which makes it hard to target ONLY my second level list

    Why? You can use something like:

    .menu ul ul ul {
    }

    Adam Blythe
    Member

    @adsleeblythe

    Hi esmi,

    yes I have solved it already was just about to write a reply to my original post. Thanks for your suggestion anyway.

    Definitely not thinking logically ATM

    I have used

    .menu ul li ul {
    }

    Thanks again

    Adam Blythe
    Member

    @adsleeblythe

    While we are on the subject,

    instead of specifying a width in px for my second level menu, is there a way using css to ‘stretch to fit?’

    Thanks

    esmi
    Forum Moderator

    @esmi

    width:auto;?

    Adam Blythe
    Member

    @adsleeblythe

    Thanks again

    No joy though. I used

    .menu ul li ul {
    width:auto;
    }

    Any other suggestions? I will have a play around.

    Thanks

    Adam Blythe
    Member

    @adsleeblythe

    Solved it

    I have used

    .sf-menu ul li ul {
    	width: auto;
    }
    .sf-menu ul li ul li a {
    	display: block;
    	white-space: nowrap;
    	padding-right: 15px;
    }

    Thanks for your help

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] CSS dropdown menu list problem’ is closed to new replies.