PDA

View Full Version : Watermark...



Nafets
08-22-2011, 06:32 PM
1) Script Title: Watermark

2) Script URL (on DD): <script language="JavaScript1.2">

/*
Watermark Backgound Image Script- Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit dynamicdrive.com
*/

if (document.all||document.getElementById)
document.body.style.background="url('notebook.jpg') white center no-repeat fixed"

</script>

3) Describe problem: Hello! I am not so good at this with html, but when I put in the code above, and I have changed the picture, and put the code close to the "Body" tag, the background colour dissapears. How do I fix that?
I have tried to change the code, put it in other places, but if I got the bgrcolour back, then the image dissapears. If I got the image to work, then the bgr-colour dissapear. Is there anyone out there who could help me with that problem?
Kind regards
Nafets/Sweden

ddadmin
08-23-2011, 04:16 AM
How big is your background image dimensions wise (without it repeating)? This could simply be a problem with your image being large enough to obscure the background color that should surround the image.

Also, try changing the code you've pasted to:

if (document.all||document.getElementById)
document.body.style.background="yellow url('notebook.jpg') center no-repeat fixed"

Where "yellow" is the desired color or hex value of your background color.

Nafets
08-23-2011, 07:47 AM
Thank you for your caring. There is no background image, just a colour.
I have tried to put in the Hex code, Hex={A3,D2,9C}, but it will always take away the background colour. This is how it looks like in the html-document:

</head>

<body bgcolor="#A3D29C"

<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="95%" id="AutoNumber1" height="462">
<tr>

I dont know if there is something wrong in the <body> script?
However, I will try it again, because I really want it to work:)
kind regards
Nafets
Sweden

Nafets
08-23-2011, 08:00 AM
Hello again!
I did it this way, I was just chancing, but it worked out! :)
Thank you for your help!:)
I looks great!
kind regards
Nafets
Sweden

Nafets
08-23-2011, 08:01 AM
Sorry!
I forgot to put in the cod i think:
<script language="JavaScript1.2">

/*
Watermark Backgound Image Script- Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit dynamicdrive.com
*/

if (document.all||document.getElementById)
document.body.style.background="url('nia_kontur_watermark_png.png') #A3D29C center no-repeat fixed"

</script>