Forum How do I...?

Background-image

JorenWillems
Hi

I added a background-image so that clients can't print out the pdf's by themselfs. At my local machine, the background-image appears, but when I publishe my website to our webserver, the background-image doesn't appear. Anyone know why?

 p.AddStyleSheet(absPath + "Templates\\css\\watermerk.css");


css:

body 
{
    background-image:url('../../images/logo_kubis.jpg');
    background-position:right bottom;
    background-repeat:no-repeat;
}
mikeday
Are there any errors or warnings in the Prince output log indicating that it is failing to load the image?
JorenWillems
nope
mikeday
Can you check if the CSS is being applied at all? For example, try changing the body text color to red in the style sheet.
JorenWillems
Yes, the text is now red so the css is applied on my local machine, but when I publish my website to the server, the css is NOT applied :s
mikeday
In that case there should be a warning in the log about failing to load the style sheet, or perhaps the wrong style sheet is installed on the server?
JorenWillems
Nope
Converted succesfully it says
mikeday
So is absPath + "Templates\\css\\watermerk.css" the correct file that you think it is? I'm running out of ideas here. :)
JorenWillems
Yes, it's a virtual path and it works on my local machine, so it should work also on the server, but it doens't...
JorenWillems
There is no error in the logfile so the css is found.
The mistake MUST be in de css file.

body 
{
    background-image:url('../../images/logo_kubis.jpg');
    background-position:bottom;
    background-repeat:repeat-x;
}
mikeday
You can email me the CSS file to take a look at. Are you sure that AddStyleSheet is being called before Convert()? There should be either an error from failing to load the style sheet, or an error from failing to load the image. If a simple rule like "body { color: red }" is not being applied, that sounds like a style sheet problem.