Results 1 to 5 of 5

Thread: Watermark...

  1. #1
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Watermark...

    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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:
    Code:
    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.
    DD Admin

  3. #3
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Watermark

    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

  4. #4
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Watermark fixed!

    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

  5. #5
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •