• Hi, I have been checking other forums and although I am finding my answer, it doesn’t make sense.

    I am using twentyeleven. I created a child theme. When I go in to change the code in CSS style sheet, the only thing that is there is the short amount of code I used to create the child theme. I am trying to change the color of the bar directly under the header. My site address is https://www.exploringhappy.com

    Thank you

Viewing 14 replies - 1 through 14 (of 14 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You’ll need to create new styles, rather than modifying previous styles.
    You can look in your parent theme’s CSS, find the style, copy & paste it into your Child Theme CSS and then modify that Child Theme code.

    Thread Starter aspiringone

    (@aspiringone)

    Tried that. The color isn’t changing. Thanks anyway.

    Thread Starter aspiringone

    (@aspiringone)

    This is how I have my code and this is the only code in my css sheet in my child theme.

    /*
    Theme Name: Twentyeleven child
    Theme URI: https://exploringhappy.com/
    Description: Child Theme for the Twentyeleven Theme
    Author: Shannon
    Author URI: https://exploringhappy.com/about-author/
    Template: twentyeleven
    Version: 1.0.0
    */
    /* Menu Background */
    #access {
    background: #222; /* Show a solid color for older browsers */
    background: -moz-linear-gradient(#252525, #0a0a0a);
    background: -o-linear-gradient(#252525, #0a0a0a);
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* older webkit syntax */
    background: -webkit-linear-gradient(#252525, #0a0a0a);
    -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    -moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    clear: both;
    display: block;
    float: left;
    margin: 0 auto 6px;
    width: 100%;
    }

    /* =Import Responsive Theme Styles
    ————————————————————– */
    @import url(‘../twentyeleven/style.css’);

    Your code must go UNDER the @import line in the file.

    Thread Starter aspiringone

    (@aspiringone)

    Thanks, tried that. Still no luck. I will have to spend some time playing with it later. It is frustrating me now ?? Thanks again.

    Okay, I looked at it now — and the problem is that you left the old CSS in there below your new code — that’s won’t work as the CSS is read top to bottom so the old code is over-riding your new.

    #access {
    	background: #222; /* Show a solid color for older browsers */
    	background: -moz-linear-gradient(#0a0a0a, #66ff00);
    	background: -o-linear-gradient(#252525, #0a0a0a);
    	background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* older webkit syntax */
    	background: -webkit-linear-gradient(#252525, #0a0a0a);
    	-webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    	-moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    	box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    	clear: both;
    	display: block;
    	float: left;
    	margin: 0 auto 6px;
    	width: 100%;
    }

    Thread Starter aspiringone

    (@aspiringone)

    Ok, I am confused now. I took code from Twenty Eleven and copied it to my child theme. I changed one line and that was it.

    Okay, sorry, my confusion. It looks like the problem is that you only changed one line…anywhere there are color codes in there, you have to change to the new colors. See if that does it.

    Thread Starter aspiringone

    (@aspiringone)

    No, didn’t work.

    What color are you trying to make it — right now it’s green and black. Try clearing your browser cache?

    Thread Starter aspiringone

    (@aspiringone)

    I was trying a green color…but really any color to see if I can get it to work. Cleared cache…still not changed. I dont want black at all.

    It WAS green-black gradient — which is what the new CSS was for. But now it’s white – -looks like you changed it. What browser are you using?

    Thread Starter aspiringone

    (@aspiringone)

    I wound up finding another forum with information on this. Apparently someone else was having the same problem. This is what did it…
    /*******************For Twenty Eleven Nav menu Background color *****************************/
    #access {
    background: none repeat scroll 0 50% transparent;
    clear: both;
    display: block;
    float: left;
    margin: 0 auto 6px;
    width: 100%;
    }

    Thread Starter aspiringone

    (@aspiringone)

    I should also add that the color code goes in place of the word transparent (for anyone interested). Thanks for your help

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Navigation/Menu bar changes’ is closed to new replies.