logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Child theme is not styling elements

I have set up a child theme for twenty eleven. I have been able to make minor adjustments to the template through the admin section. Now I would like to make some color and content adjustments but I am running into some trouble.

How do I style the navigation? I used Firebug to locate, and attempted to change the color of the background from black to white. It is not taking. Do I need to style a different element altogether or overwrite more than one from the parent?

http://dev1.lauradenyes.com/

Currently I have added the following to the child theme:
#access{
background-color: #ffffff;
}

#access a{
background-color: #ffffff;
color: #000;
}

Further, this was styled as a starting point. What I would eventually like to do is slap a background image behind the entire navigation. I hope to cut the bottom of the banner image off and splice it behind the navigation so that the navigation links are just below the graphic. Less negative space.

Or if it is smarter to use negative padding for the entire navigation to move the line of copy up, I am also open to that.

Ideas?

This question has been answered.

attachment image View Attachment

little D | 07/18/12 at 4:31pm Edit


(4) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    07/18/12
    4:40pm
    AdamGold says:

    #access{
    background: #ffffff;
    }


    I don't fully understand what you want to do with the navigation, but if you want to move it up so it will be on the banner, you can use margin-top: -_px (where of course _ is a number).

    Previous versions of this answer: 07/18/12 at 4:40pm

  • avatar
    Last edited:
    07/18/12
    4:38pm
    Michael Caputo says:

    Your nav color should be how you have it... Clear your cache?

    your links in the nav are in the
    #access ul li a{background-color:#FFF;color:#000;}

    If this doesn't work, i'd suggest you clear your cache, and make sure you're getting the latest versions of the file.

  • avatar
    Last edited:
    07/18/12
    4:47pm
    Kailey Lampert says:

    Because of the gradient applied, 'background-color' isn't enough on its own.

    either use

    background: #fff;
    or
    background-color: #fff;
    background-image: none;


    And changing the link color only requires
    #access a {
    color: #000;
    }


    Missed the part about navigation...

    Adding 'margin-top: -30px' (or so, adjust as needed) should lift your navigation up just right. Negative padding isn't a thing, so that won't help you much.

    Previous versions of this answer: 07/18/12 at 4:40pm | 07/18/12 at 4:44pm | 07/18/12 at 4:47pm

    • 07/18/12 6:44pm

      little D says:

      Thank you. hm. background color still appears black... background-image:none does not appear to do the trick. There must be another element I am missing.

  • avatar
    Last edited:
    07/18/12
    4:46pm
    Manoj Raj says:

    /*
    Theme Name: Twentyeleven Child
    Description: Child theme for the twentyeleven theme
    Author: Your name here
    Template: twentyeleven
    */

    @import url("../twentyeleven/style.css");

    #access{
    background-color: #ffffff;
    }

    #access a{
    background-color: #ffffff;
    color: #000;
    }

    Is this the way you defined your child theme's css?

    • 07/18/12 4:54pm

      Manoj Raj says:

      Have you activated the child theme? Currently it is showing the main twentyeleven theme in your website...

    • 07/18/12 5:30pm

      Manoj Raj says:

      For the navigation thing ... add this to your child theme css

      .only-search.with-image {
      margin-top: -24px;
      position: relative;
      z-index: 2;
      }

      #access { position: relative; z-index: 1; }

      #branding .with-image #searchform { bottom: -37px;}

      So your final css for the child theme would be the following

      /*
      Theme Name: Twentyeleven Child
      Description: Child theme for the twentyeleven theme
      Author: Your name here
      Template: twentyeleven
      */

      @import url("../twentyeleven/style.css");

      #access{
      background-color: #ffffff;
      }

      #access a{
      background-color: #ffffff;
      color: #000;
      }

      .only-search.with-image {
      margin-top: -24px;
      position: relative;
      z-index: 2;
      }

      #access { position: relative; z-index: 1; }

      #branding .with-image #searchform { bottom: -37px;}


    • 07/18/12 6:46pm

      little D says:

      Nice! Updated the theme to the child-theme, reset the banner image, added the styling info and we're almost there but now there is a pesky black background covering the banner graphic. Do I need to set the background to transparent?

      Attached Image

    • 07/18/12 6:50pm

      Manoj Raj says:

      add

      background: none transparent;
      to the #access in the child css file

    • 07/18/12 6:56pm

      Manoj Raj says:

      Actually i misunderstood your previous question...you mean the gray border above the banner image?

      To remove it add the following to your child css

      #branding { border: 0; }

    • 07/18/12 7:01pm

      Manoj Raj says:

      Also remove the following line from Child style.css file


      <style type="text/css">

    • 07/18/12 7:11pm

      Manoj Raj says:

      Remove everything from your style.css of Child theme and add the following


      /*
      Theme Name: Twenty Eleven Child
      Description: Child theme for the Twenty Eleven theme
      Author: L Denyes
      Template: twentyeleven
      Version: 0.1.0
      */


      @import url("../twentyeleven/style.css");


      /* Child Theme */

      #access a{
      background-color: #ffffff;
      color: #000;
      }

      .only-search.with-image {
      margin-top: -24px;
      position: relative;
      z-index: 2;
      }

      #access {
      position: relative; z-index: 1; background: none transparent;}

      #branding { border: 0; }
      #branding .with-image #searchform {
      bottom: -37px;}

    • 07/18/12 7:48pm

      little D says:

      Thank you, Manoj! The navigation overlaps the banner a bit and I've adjusted the negative margin by a pixel to fix. (not negative padding -- thank you, Kailey).

      Otherwise -- perfect!!

This question has expired.



Hai Bui, Arnav Joy, little D voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.