1.

Solve : doubt about background properties in html?

Answer»

hi,

   i'm using linux as OS and language is PHP.  I set  watermark image in my html code .i'm running this code in websever and i can view the background image while running the code.but when i download it to my local system that image is not seen.

this is my code to set watermark image:

Code: [Select]"<h1><br><DIV style='background-image:url(images/watermark.jpg);
background-repeat: repeat-y;
background-position: 60% 60%;
margin: 0px 12px 0px 10px;'><CENTER>$heading <br><br><br>So your background is set using this:

Code: [Select]background-image:url(images/watermark.jpg)

Let's do a thought EXPERIMENT. Your problem is that when you download the page you cannot view it when it is local.

Let's assume that this page is sitting, normally, at www.example.com/document.php; the images are in www.example.com/images, and so forth.

Now when you download the page, it is at D:\downloads\document.html (or something). So when the browser opens it, how is it going to KNOW that it needs to look at www.example.com/images for the images? In the file they are only mentioned using a relative path, so the browser tries to use that relative path. in our example it would look for the image in D:\downloads\images, where it will PROBABLY not find them unless you put them there.



Discussion

No Comment Found