New to css – change background color?
-
My url is http://ihguys.wordpress.com/
The theme calls for white background but I’d like to rotate from time to time to red or black too. I read that the theme css style sheet cannot be changed but can be “overridden” by my own code. I’m hoping someone can paste the code in a reply so I can see what I need to add.
Then I assume I paste that at the bottom of the theme css sheet that already exists – right?
Thanks.
JDS
-
The relevant code from MY CSS is:
body { background:#fff url('http://ntuat.files.wordpress.com/2007/02/meadowbk2.jpg') bottom left repeat-x; color:#000; font-family:'arial', sans-serif; font-size:0.8em; line-height:1.4em; margin:0; padding:0; }The background color here is set to #fff, which is white. You should be having this in your CSS too. Just change the #fff value to whatever color you want to use.
-
Pasted my CSS code here for your review. It is slightly different. I’m not sure what to change – or if I even can.
body {
font-size: 62.5%; /* Resets 1em to 10px */
font-family: ‘Lucida Grande’, Verdana, Arial, Sans-Serif;
background: #d5d6d7 url(‘images/kubrickbgcolor.jpg’);
color: #333;
text-align: center;
}#page {
background-color: white;
border: 1px solid #959596;
text-align: left;
}#header {
background: #73a0c5 url(‘images/kubrickheader.jpg’) no-repeat bottom center;
} -
The section you want to change is under #page. Copy that and paste it into the editing box on the CSS page (not the actual stylesheet). Change the colour from white to ‘red’ and then click on Preview. If it looks the way you want, make sure to go back and click on ‘Save Stylesheet’ to apply the changes to your blog.
-
I must be missing something. I can get to the Edit CSS page. Window there with some CSS notes. Beneath that, there is a “view stylesheet” link. When I click that I see the CSS page but I can’t edit it. I guess I don’t know where/how to make the change?????
-
I tried pasting the “page” section of CSS code into the “window” on the CSS editor page, changed the color from “white” to “red”, clicked “preview”, and was in fact taken to a preview page of the site. But, no background color change, only a lined boarder around the main page. ???
Plus, the top of the preview page read “Preview: you must purchase the Custom CSS Upgrade to save your changes”.
Real confused now!
-
Have you paid for the upgrade? If so, then you go back to the CSS editor page and just click Save Changes. If not, you can’t save them.
-
-
-
Bingo. (and ‘body’ is what you want to change if you spring for the upgrade)
/nod and wave to rosclarke!
-
Exactly. But the Preview tool is pretty useful if you don’t have a lot of CSS experience and you just want to play around a bit before deciding whether to pay the cash.
- The topic ‘New to css – change background color?’ is closed to new replies.