Title: Child Theme &#8211; CSS nightmare
Last modified: August 21, 2016

---

# Child Theme – CSS nightmare

 *  [aliali007](https://wordpress.org/support/users/aliali007/)
 * (@aliali007)
 * [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/)
 * Hello, recently I started using WordPress and managed to setup Child theme on
   TwentyTwelve. But for the past few hours I have not been able to add some css
   on the child theme, I’ve been trying to change the background colour but have
   failed miserably.
 * Can someone please help me out here. Surely there’s a solution.
 * Hope to hear from someone.
 * Thanks
 * _[Moderator Note: [No bumping](http://codex.wordpress.org/Forum_Welcome#No_Bumping).
   If it’s that urgent after just 30 minutes, consider [hiring someone](http://jobs.wordpress.net/)
   instead.]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/#post-4841688)
 * what CSS exactly are you trying to apply?
 * what is the full code of style.css of the child theme?
 * can you provide a link to your site?
 * are you using a browser inspection tool to clearly find out which styles you 
   need to change for the background?
 * have you tried to use the ‘**dashboard – appearance – background**‘ option to
   set the background color of the site?
 *  Thread Starter [aliali007](https://wordpress.org/support/users/aliali007/)
 * (@aliali007)
 * [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/#post-4841776)
 * Hello alchymyth, thanks for your response appreciate it very much.
    I am trying
   to change the background colour of the child theme.
 * The following is the code of the style.css:-
 *  Theme Name: Twenty Twelve Child
    Description: Twenty Fourteen Child Theme Template:
   twentytwelve Version: 1.0.0 Tags: light, dark, two-columns, right-sidebar, responsive-
   layout, accessibility-ready Text Domain: twenty-twelve-child */
 * [@import](https://wordpress.org/support/users/import/) url(“../twentytwelve/style.
   css”);
 * background {
    background-color: #000000; }
 * I have been using Firefox along with Inspect Element with Firebug.
 * Also, I am able to go into ‘dashboard – appearance – background’ option and set
   the background. But how would I do it so it works in the style.css?
 * Thanks
 *  [mrtom414](https://wordpress.org/support/users/mrtom414/)
 * (@mrtom414)
 * [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/#post-4841816)
 * Your problem is with the your statement.
 * background {
    background-color: #000000; }
 * What are you trying to change the background color on. The statement that you
   gave will do nothing. If you look at CSS rules for your site you will see they
   usually start with either a “.” or “#”.
 * The “.” is used to specify a class that you want to change the color on and the“#”
   is used to change an id. You can also use selectors like ul,li,body, and so on.
 * If you wanted to change your background color for the page you would use body{
   background-color:<<color value>>;.
 * if you wanted to change an element with an id of myelement you would use #myelement{
   background-color:<<colorvalue>>}
 * If you wanted to change an element that uses a class of myclass you would use
   the statement .myclass{background-color:<<colorvalue>>;
 * Background as you are presenting it is not a class,id, or selector so it will
   do nothing.
 *  Thread Starter [aliali007](https://wordpress.org/support/users/aliali007/)
 * (@aliali007)
 * [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/#post-4841826)
 * Hey mrtom414 thanks for your response. I was trying to change the background 
   colour to the following: #B24747. But wanted to change it using style.css I tried
   using:-
 * background {
    background-color: #B24747; }
 * I also tried adding “.” & “#”. Yet still it wouldn’t work.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/#post-4841838)
 * are you talking about the general background behind the site?
 * if the **‘dashboard – appearance – background’** option does not work, try:
 * `body { background: #B24747!important; }`
 * or exactly what other background are you referring to?
 *  Thread Starter [aliali007](https://wordpress.org/support/users/aliali007/)
 * (@aliali007)
 * [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/#post-4841841)
 * Hey, you are fricking awesome! Finally after long time we have got it working.
   Very strange on why it would work in the first place.
 * Thanks again mate appreciate it very much.
 * BTW, would you happen to know how to add border to the navigation menu and page?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Child Theme – CSS nightmare’ is closed to new replies.

 * 6 replies
 * 3 participants
 * Last reply from: [aliali007](https://wordpress.org/support/users/aliali007/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/child-theme-css-nightmare/#post-4841841)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
