I'm tyingto change the background of a div for each page. There was a thread before over this subject, but it doesn't work for me. So the question is, what am I doing wrong?
The previous thread is: http://wordpress.org/support/topic/css-div-background-image-change-by-page-id?replies=11
My code so far.
PHP
<?php
$class = '';
if (is_page('Home')) {
$class = 'home1';
} elseif (is_page('Counseling')) {
$class = 'counseling';
} ?>
CSS
#header {
height: 225px;
background: #fff no-repeat;
background-image: url(/img/header_visual/1.jpg);
position: relative;
margin-bottom: 20px;
}
#header.home1 {background-image: url(/img/header_visual/7.jpg);}
I'm hoping somebody can help me.