Changing Backround-Fortune Theme
-
Hi
Does anyone have a way for me to change the color of the background on ONE of my pages. I don’t want to change it for all.Thanks!
The blog I need help with is: (visible only to logged in users)
-
Hi there.
To restrict css actions to one page, you will need this page id. You can get it from body tag, at the very beginning of your page HTML code. For instance, your main page body tag looks like:
<body class=”home page page-id-8 page-template page-template-templates page-template-front-page page-template-templatesfront-page-php custom-background mp6 typekit-enabled customizer-styles-applied has-sidebar has-custom-background highlander-enabled highlander-light custom-colors”>
That means you can extract page-id-8 to select the exact page in which you want your changes to take effect. (If you have problems to get this id, just tell us which page you want to select and we will take a look).
Lets change the main page background! (I choose an awful :S red color -rgb(255,0,0)-, so of course you can change it: if you need help with RGB notation, you can use these tables).
The css code to add would be:
body.page-id-8 { background-color: rgb(255,0,0); }As you can check, not everything turned to red with this code, as there are other ‘boxes’ or areas over the body with specific backgrounds (I mean the header, the widgets area…). If you need help identifying and changing background to these areas, make us know.
I hope this helps.
-
- The topic ‘Changing Backround-Fortune Theme’ is closed to new replies.