Click to See Complete Forum and Search --> : BG Effects script


big Chris
11-27-2003, 02:45 PM
I downloaded the BG Effects script from

http://javascript.internet.com/bgeffects/full-size-image.html

earlier today and it's fantastic!!!.....except it won't do as it suggests in the code and run as a background image.
The image resizes fine but when I put a table containing text on the page the image sits in front of it.....any ideas as to how this can be solved would be much appreciated.

Regards,

Pittimann
11-28-2003, 04:12 AM
Hi!

This script doesn't claim to "produce" a background image. It just deals with resizing an image to the window size.

The script is writing the image and its' attributes into a div:
---------
<div id="backgroundLayer" style="position:absolute; width:200px; height:115px; z-index:1; left: 0px; top: 0; visibility: hidden">
(script)
</div>
---------
If you put your content (text, or - if you insist - a table with text or whatever content) in another div with at least the same value for the z-index, the contents will be "above" the image. Simple example with what you can play; to be placed e.g. after the closing </div> tag already in the script:
---------
<div id="content" style="position:absolute; width:200px; height:115px; z-index:1; left: 0px; top: 0;">
blahblah
</div>
The text "blahblah" will be visible "above" the image in the upper left corner of the window...

Cheers - Pit