WordPress.org

Ready to get started?Download WordPress

Forums

edit only parents style in pilcrow menu (8 posts)

  1. biojl
    Member
    Posted 2 years ago #

    Hi,

    I need to edit the css to modify the background and color of a menu, but only the parent items, not the childs in order to differentiate them.
    I found the code at style.css but I am unable of modifying only the parents.

    Any help would be great.

  2. sacredpath
    Member
    Posted 2 years ago #

    Can we have a link to the site please?

  3. sacredpath
    Member
    Posted 2 years ago #

    Change the background color in
    #nav .current_page_item a, #nav li:hover > a, #nav ul ul *:hover > a
    and the backgrounds on the dropdowns will remain dark.

  4. sacredpath
    Member
    Posted 2 years ago #

    Also for working with CSS, get the Firebug add-on for Firefox. It will make it much easier to identify the selectors and declarations and you can try things out in realtime.

    http://getfirebug.com/

  5. biojl
    Member
    Posted 2 years ago #

    For a few hours the web is in:

    http://egtest.imim.es/wordpress/

    I only want to make different the first item when there is a dropdown list, not always (i.e. publications). I've seen the "optional css" in the wordpress menu when adding an item to the menu, but don't know how it really works.

    Thanks in advance

  6. sacredpath
    Member
    Posted 2 years ago #

    The selector I identified above will change the top level tab color for the current page/menu item, and also when you hover. Is that what you are looking for? Did you try changing the background color here to see if that does what you want?

    #nav .current_page_item a, #nav li:hover > a, #nav ul ul *:hover > a {
    background: #222222;
    color: #E2C275;
    }
  7. biojl
    Member
    Posted 2 years ago #

    Yes, I finally used that plus a blank link at the top menu with an arrow indicating that there is a dropdown menu there.

    Thanks for the help!

  8. sacredpath
    Member
    Posted 2 years ago #

    You are welcome.

Topic Closed

This topic has been closed to new replies.

About this Topic