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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.