• 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

WordPress adds CSS to custom menu items?

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 › WordPress adds CSS to custom menu items?

This topic is: resolved

Tagged: classes, social icons

  • This topic has 37 replies, 5 voices, and was last updated 12 years, 10 months ago by susanlangenes.
Viewing 18 posts - 21 through 38 (of 38 total)
← 1 2
  • Author
    Posts
  • February 2, 2013 at 4:28 pm #17456
    daniel123
    Member

    Any help?

    February 2, 2013 at 6:30 pm #17494
    daniel123
    Member

    John, any help here? Thanks.

    February 3, 2013 at 9:37 am #17617
    daniel123
    Member

    I've tried and tried and cannot this to work.

    February 4, 2013 at 5:24 pm #18077
    daniel123
    Member

    Can anyone help?

    February 4, 2013 at 7:07 pm #18117
    daniel123
    Member

    Sozo would you mind checking my problem out?

    February 5, 2013 at 3:04 pm #18321
    daniel123
    Member

    If anyone can help me with my blog: UberBlogging.com

    I am trying to keep these nav icons from moving everytime I hover over them and position them correctly. Don't tell me what to do because I do not understand. Show me an example or even better, the code needed to fix this.

    February 5, 2013 at 6:00 pm #18343
    daniel123
    Member

    Can anyone help me? Support is lacking..

    February 6, 2013 at 6:16 pm #18554
    daniel123
    Member

    SOMEONE HELP ME!

    February 6, 2013 at 10:28 pm #18576
    Ozzy
    Member

    hi daniel,

    in your css, find

    .menu-twitter a {

    and remove everything in that rule.

    find

    .menu li.facebook {

    and remove everything in that rule.

    add the following to your css:

    .menu li.menu-twitter {
    	background: url("http://uberblogging.com/wp-content/uploads/2013/01/social_twitter_box_blue_128-e1359321440170.png") no-repeat left center transparent;
    	margin-left: 70px;
    	padding-right: 10px;
    	text-indent: -9999px;
    	width: 40px;
    }
    
    .menu li.menu-facebook {
    	background: url("http://uberblogging.com/wp-content/uploads/2013/01/social_facebook_box_blue_128-e1359322484918.png") no-repeat left center transparent;
    	margin-left: -15px;
    	text-indent: -9999px;
    	width: 40px;
    }

    i think that should fix the issue you're having.


    Ozzy Rodriguez | Twitter | Google+

    February 6, 2013 at 10:54 pm #18580
    joelmoney
    Participant

    Daniel-

    What is your goal for this?  Meaning..what should it look like when complete?

    Is the Facebook logo working as you want it?

    If so..add your background image positioning call the same way as you are for the Facebook one.

    Currently you are calling twitter via the anchor tag ( <a> ) and facebook on the <li>

    .menu-twitter a {
    text-indent: -9999px;
    background-image:url(http://uberblogging.com/wp-content/uploads/2013/01/social_twitter_box_blue_128-e1359321440170.png) !important;
    background-repeat: no-repeat !important;
    margin-left: 70px !important;
    width: 30px;

    }
    -VS-
    .menu li.menu-facebook {
    text-indent: -9999px;
    background-image:url(http://uberblogging.com/wp-content/uploads/2013/01/social_facebook_box_blue_128-e1359322484918.png) !important;
    background-repeat: no-repeat !important;
    margin-left: -15px !important;
    width: 30px;
    }

    IF so...you can try just removing the above twitter style and adding this:
    .menu li.menu-twitter {
    text-indent: -9999px;
    background-image:url(http://uberblogging.com/wp-content/uploads/2013/01/social_twitter_box_blue_128-e1359321440170.png) !important;
    background-repeat: no-repeat !important;
    margin-left: -15px !important;
    width: 30px;
    }
    and you should be pretty close to what you are looking for.

    February 7, 2013 at 12:56 am #18587
    susanlangenes
    Member

    Hey Daniel,  like SoZo said your problem is in the hover.

    On line 375 in your stylesheet you have this stuff:

    .menu-primary li a:active, .menu-primary li a:hover, .menu-primary .current_page_item a, .menu-primary .current-cat a, .menu-primary .current-menu-item a, .menu-secondary li a:active, .menu-secondary li a:hover, .menu-secondary .current_page_item a, .menu-secondary .current-cat a, .menu-secondary .current-menu-item a, #header .menu li a:active, #header .menu li a:hover, #header .menu .current_page_item a, #header .menu .current-cat a, #header .menu .current-menu-item a {

    background: url(images/nav-link.png) top center no-repeat;
    color: white !important;

    So what you need to do is get rid of that background image for your twitter nav menu item.  I would start with something like this:

    .menu li.menu-twitter a:hover { background: none; }

    or similar.

    I noticed you have these things roughly at line 311:

    .menu li.menu-twitter a:hover,
    .menu li.menu-facebook a:hover {
    }

    If you try to apply style rules there, they'll get overridden by the stuff at line 375.  So make sure you put the a:hover rules AFTER the stuff at line 375.

    Let us know how it goes.  🙂

    February 7, 2013 at 4:31 pm #18765
    daniel123
    Member

    Thanks alot everyone. I followed Joel's steps and everything is looking good. One issue: how would I go about removing or overriding the default hover rule when hovering over the twitter/facebook icons?

    February 8, 2013 at 7:59 am #18919
    daniel123
    Member

    Anyone ?

    February 8, 2013 at 1:40 pm #19020
    susanlangenes
    Member

    Put

    .menu li.menu-twitter a:hover { background: none; }

    anywhere AFTER line 375 in your stylesheet.

     

    February 8, 2013 at 4:59 pm #19110
    daniel123
    Member

    Thanks Susan, how do I go about removing the white triangle when I hover over the icons though?

    February 8, 2013 at 7:00 pm #19129
    susanlangenes
    Member

    Daniel, if you put

    .menu li.menu-twitter a:hover { background: none; }

    anywhere AFTER line 375 in your stylesheet, that triangle will go away.  Seriously.

    You will likely also want to add the following:

    .menu li.menu-twitter a:active, .menu li.menu-facebook a:hover, .menu li.menu-facebook a:active {background:none; }

    February 8, 2013 at 8:52 pm #19144
    daniel123
    Member

    Thanks TONS!

    February 8, 2013 at 8:58 pm #19145
    susanlangenes
    Member

    No problem. Hey, you got the RSS icon on there too!  Nice work!  🙂

  • Author
    Posts
Viewing 18 posts - 21 through 38 (of 38 total)
← 1 2
  • The topic ‘WordPress adds CSS to custom menu items?’ 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