Results 1 to 5 of 5

Thread: Watermark background image

  1. #1
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Watermark background image

    Using this script

    http://www.dynamicdrive.com/dynamicindex3/fixback.htm

    ----------------------------------------------------------

    I have successfully used this script on a simple page, and now want to use it inside a table but can't.

    What i want to achieve is a fixed position background image inside the centre column of a table behind text.

    What I get is the image on the page BEHIND the table so it won't show!

    The situation is complicated by using SSI ingredients. Each pages has 4 elements:

    top_page.htm
    bottom_page.htm
    text.htm
    text.shtml

    text.shtml calls the other three elements into the correct positions.

    I have tried including the script inside both text.shtml and text.htm, but it always ends up as PAGE background not table background. I'm probably missing something pretty simple, but I'm new to this game :-)

    here's the script

    <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>

    cheers,

    Ivan

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    What browser are you using? Does your page have a doctype? Be aware that fixed backgrounds work only for the body in IE, other browsers allow them for things like tables.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am using IE, but have no doctype set. Sounds like maybe just can't use inside a table :-(

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You should still be able to use a standard background for the table ex:
    HTML Code:
    <table style="background:url('some.jpg') no-repeat center">
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John -- standard backgrounds aren't the problem. It would be good to get the static watermark script working one day.

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
  •