Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Watermarks in HTML or CSS

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, does anyone know whether its possible to create watermarks on printed HTML pages? I believe its possible to create watermarks using the background tag in IE although this doesn't seem to print.

The solution only needs to work for IE.

Does anyone have any ideas?


M
 
You could put everything inside your current <body> into a div like this:

<div style=&quot;z-index:1;&quot;><!--the text--></div>

and then make a separate <div>:

<div style=&quot;z-index:0;&quot;><img src=&quot;image.gif&quot; width=&quot;100%&quot; height=&quot;100%&quot;></div>

If you wanted to do a background image, you would have to set your printing properties in IE to &quot;print borders and backgrounds&quot;. The problem with this is that by simply setting it on your machine, your users will not know to do the same and it will only work on those with it turned on.

Rick
 
I think this is what you want:
[tt]
<style>
@media print {
body { background: url(&quot;images/aardvark.gif&quot;) norepeat }
}
</style>
[/tt]
Add this to the <head> of your page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top