Using “100% x 100%” Background Image
-
Hi,
I’m attempting to edit the kubrick template to display a background image that fits the browser no matter what the screen resolution is.
I’ve attempted to edit style.css in this fashion, adding:#bg-im { position: absolute; z-index:1; width:100%; height:100%; } #bg { margin-left: -100%; }And then I dropped a div tag into the header.php file:
<body> <div id="bg"> <img id="bg-im" src="<?php bloginfo('stylesheet_directory'); ?>/images/lbbyhaba.jpg"> </div> <div id="page"> .........And then updating the z-index of every other style id I could find to try to make the content appear in front of the background image.
I didn’t really like using the margin-left: -100%…I honestly have no idea what is going on here. I just used that because it put the image where I wanted it.
My real problem is that no matter what I use for z indices, my “background image” displays in front of the wordpress content.
Thanks for any help…complete newb here…
The topic ‘Using “100% x 100%” Background Image’ is closed to new replies.