Jump to content

100% background image is rendering page useless...help?


stevengreen22

Recommended Posts

Hi guys,

 

Thanks for taking the time to read.

 

I'm working on a project and was just"polishing" things.  I found an awesome background image that I want stretched.  I've got this to work but then it wouldn't validate.  I then contained it within another div but it seems to be sitting on top of all of the others even when I've set the z-index to negative.

 

Can you please help?

 

I have...

 

html {
    
    height:100%;
    margin:0;
    padding:0;
}

#bg {
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index: -999;
     -moz-background-size:100% 100%; /* Firefox 3.6 */
    background-size:100% 100%;
    background-repeat:no-repeat;
    background-image:url(btest2.jpg);
}

body {

    width:100%;
    height:100%;
    margin:0;
    padding: 0;
    font-family: arial, helvetica, sans-serif;
    height:100%;
    position:relative;

for the css and

 

</head>
    <body>
       
<div id ="bg">
        <div id="wrapper"> 

            <div id="header">

is the relevant part of the html.

 

Many thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.