stilsen
08-25-2006, 03:13 PM
this is sort of a javascript/html/css question:
im using a javascript to randomly position many small images on the page,
and i want them to be in the background relative to other content on the page. for example, the command below is run a bunch of times in a javascript in my header, which i call from the body:
document.write('<img src="./images/' + img_rnd[i] + '" style="z-index: 1; position: absolute; left:' + x[i] + '; top: ' + y[i] + '; width: ' + img_width + '; height: ' + img_height + ';"></img>');
despite setting z-indexes to 2 for my divs/layrs/tables in the body, i cant get them to overlap the images positioned by the document.write call.
is there a better/different way to get these images to be "in the background"?
thanks,
sam
im using a javascript to randomly position many small images on the page,
and i want them to be in the background relative to other content on the page. for example, the command below is run a bunch of times in a javascript in my header, which i call from the body:
document.write('<img src="./images/' + img_rnd[i] + '" style="z-index: 1; position: absolute; left:' + x[i] + '; top: ' + y[i] + '; width: ' + img_width + '; height: ' + img_height + ';"></img>');
despite setting z-indexes to 2 for my divs/layrs/tables in the body, i cant get them to overlap the images positioned by the document.write call.
is there a better/different way to get these images to be "in the background"?
thanks,
sam