• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Genesis Simple Sidebar – Custom CSS

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Genesis Simple Sidebar – Custom CSS

This topic is: resolved

Tagged: custom css class, Genesis Simple Sidebars

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 3 months ago by jodzeee.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 6, 2013 at 3:45 am #18404
    jodzeee
    Member

    I need some help with CSS styling of my custom menu, please.

    I created custom sidebars using the Genesis Simple Sidebars plugin. It provides a place for me to add a custom class. My custom sidebar has a custom menu in it. The menu contains pages and child pages. In the case of the children, I don't want the parent to link to anything. The way I accomplished that is using a custom link with # in the menu. Since that shows as a link, I tried just leaving it blank (which I heard may not work on mobile devices). It's still showing up as a link, there's just no href.

    So I thought I could just add a custom class and color it black, remove the underline, and change the cursor to "default" to make it look like it's not a link.

    Basically, what I'm trying to accomplish is having the parent act as a subhead for the child links.

    I created a custom class called "menu-section-head" and put the following in my stylesheet. It almost worked, but it affects the children as well. How do I target only the one item and not the whole grouping?

    .menu-section-head a {color: black; background: white;
    text-decoration: none; cursor: default;
    }

    Sorry so long-winded ... I'm developing locally, so I can't provide a link and thought it best to try to describe in detail.

    February 18, 2013 at 4:43 pm #21116
    Peter
    Member

    When you create a rule for something like ".menu-section-head a" it applies to all "a" elements beneath the ".menu-section-head" element.. so what you need to do is add the CSS class to the top level a element and target that specifically.

    So your "heading" link might look something like this;

    <a class="menu-section-head">Section Heading</a>

    and then your CSS would look like this;

    a.menu-section-head {color:#000;text-decoration:none;cursor:default;}
    February 18, 2013 at 10:51 pm #21202
    jodzeee
    Member

    Ah! Thanks for the reply, I'll try that. I guess I need to learn CSS better!

    In the meantime, I got it to work with this:

    .menu-section-head > a:first-child
    Thanks again for your help.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Genesis Simple Sidebar – Custom CSS’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble