WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] CSS dropdown menu list problem (7 posts)

  1. adsleeblythe
    Member
    Posted 2 years ago #

    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!

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    which makes it hard to target ONLY my second level list

    Why? You can use something like:

    .menu ul ul ul {
    }
  3. adsleeblythe
    Member
    Posted 2 years ago #

    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

  4. adsleeblythe
    Member
    Posted 2 years ago #

    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

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    width:auto;?

  6. adsleeblythe
    Member
    Posted 2 years ago #

    Thanks again

    No joy though. I used

    .menu ul li ul {
    width:auto;
    }

    Any other suggestions? I will have a play around.

    Thanks

  7. adsleeblythe
    Member
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags