trouble with different background on other pages
Permalink
Hi im using the following code in Custom Attributes but not working. works before converting it to C5.
style>html {
margin:0px;
background-image: url(coffs-harbour-physiotherapist/bg1.jpg);
background-repeat: repeat-x;
}
</style>
If anyone could help it would be much appreciated!
style>html {
margin:0px;
background-image: url(coffs-harbour-physiotherapist/bg1.jpg);
background-repeat: repeat-x;
}
</style>
If anyone could help it would be much appreciated!
Is there a live URL we could look at?
It appears that the styling you are adding through the 'Add Header Content' is targeting the < HTML > tag but the main.css stylesheet is adding a background image to the < BODY > tag so you won't see the HTML background even if the paths to the 'staff.jpg' image was correct (which it isn't).
You need to make sure the path to your 'staff.jpg' image is an actual, real physical path on the server. "coffs-harbour-physiotherapists" is the name of the page but is not an actual directory on your server.
That's not how I would do this. I would create an 'image' page attribute called 'page_background' and add it to the page. Then I would add this to the BODY tag:
You need to make sure the path to your 'staff.jpg' image is an actual, real physical path on the server. "coffs-harbour-physiotherapists" is the name of the page but is not an actual directory on your server.
That's not how I would do this. I would create an 'image' page attribute called 'page_background' and add it to the page. Then I would add this to the BODY tag:
<body style="<?php if ($c->getCollectionAttributeValue('page_background')){?>background-image:url(<?php echo $c->getAttribute('page_background')->getVersion()->getRelativePath();?>)<?php } ?>">