OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Target top level parent with CSS

Resolved

Requested: 8 months and 4 days ago

Hi there,

I am using the following css in my theme to target the top level parent annd apply a background and border.

Is it possible to target the css to change the colours if no parent is found ie we are at the top level?

#wp-widget-advanced_sidebar_menu-wrap .parent-sidebar-menu > li > a {
background-color: red !important;
border-bottom:1px solid rgba(0,158,222,.2);
}

Plugin: Advanced Sidebar Menu

  1. Dion Bairle

    8 months and 4 days ago

    Further to this is it possible to apply hover to the top level item only?

  2. OnPoint Plugins

    8 months and 3 days ago

    Good morning Dion,

    You may target the top level parent when you are on the top level by adding the .current_page_item class to the CSS like so.

    You may add a hover effect to the top level parent by adding :hover to your li selector.

    If you would like to add a hover effect to the top level parent when you are on the top level by combining both techniques.

    Have a great rest of your weekend!

New Response Cancel reply

You must be logged in to respond. Only PRO members are allowed to respond to support requests.

© 2022 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact