WordPress.org

Support

Support » Themes and Templates » edit only parents style in pilcrow menu

edit only parents style in pilcrow menu

  • 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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • sacredpath
    Automattic Happiness Engineer

    @sacredpath

    Can we have a link to the site please?

    sacredpath
    Automattic Happiness Engineer

    @sacredpath

    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.

    sacredpath
    Automattic Happiness Engineer

    @sacredpath

    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/

    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

    sacredpath
    Automattic Happiness Engineer

    @sacredpath

    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;
    }

    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!

    sacredpath
    Automattic Happiness Engineer

    @sacredpath

    You are welcome.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘edit only parents style in pilcrow menu’ is closed to new replies.