Changing the PAGE WRAP color for each page. PHP?
-
Hey,
I have a site that needs to have “different colors” for each page’s PAGE WRAP background image. A lot of forums discuss simply the background color of a page, but in my case, it is a constant background with the PAGE WRAP colors changing.
ALSO – I am using a translucent .png file (repeated) to create a see thru color for this background. So I am looking for some php or css that allows me to specify each page’s page wrap’s background image.
For example I have something like this already working for me for each banners that go on the different pages:
<div id=”banner-image”>
<?php if (is_page(‘about’)) { ?> <?php bloginfo(‘image_url’); ?><img src=”/images/top_banners/about.jpg”><?php } ?>
<?php if (is_page(‘contact’)) { ?> <?php bloginfo(‘image_url’); ?><img src=”/images/top_banners/contact.jpg”><?php } ?>
</div>Right now I am only able to assign 1 color (background image) to all the page wraps, since I can only seem to color the background of my pagewrap from my style.css file.
Here is the code for my css that is assigning only 1 color. (again, I am using a bg image to color my pagewrap.)#page-wrap {
width: 830px;
margin: 0px auto ;
background: url(images/bg_about.png);
}Somehow when it comes to the php for background image of the PAGE WRAP – I am very lost… Does anyone have any suggestions? What are the tags I should use instead of assigning from the style sheet? How do I change it for each page?
Thanks for your help!
Meekr
- The topic ‘Changing the PAGE WRAP color for each page. PHP?’ is closed to new replies.