View Full Version : Looking for 'building resizable background img into exsiting site' solution.

06-21-2010, 04:13 PM

I have a small job placing an image in the background on all pages of an existing website and have a few questions. The background image has to resize to the full width and height of the browser at all times and does so with the code below.

It's going in to this website: http://www.ultima.no/ like in this example I put together: http://www.superfunk.com/work/ultima/index4.html

My questions are:

1. Can a negative z-index cause problems?

2. And most importantly in what solution would be the best/easiet to implement this with: http://www.ultima.no/ ? Some kind of include? Or some way through CSS since it's already loaded on all pages?

<style type="text/css">
.bg {
width: 100%;
height: 100%;
position: fixed;
margin: 0 auto;
z-index: -1;

<img class="bg" src="bg.png" alt="" />

...page continues

Thank you for your time and have a very nice day!