Jump to content

Background Image


snoepdogg

Recommended Posts

Hi,

 

I'm working on a website here I want to have three fixed backgrounds on different places. Now two BGs are working propperly but one not.

 

The HTML

 

<body>
<div class="divBG1">
<div class="divBG2">

    Content website.........

</div>
</div>
</body>

 

The CSS

 

html {
width:100%;
height:100%;
}
body {
background:url(image1.png) repeat-x fixed bottom #FFFFFF;

margin:0px;
padding:0px;

position:absolute;
height:100%;
width:100%;
}
.divBG1 {
background:url(image2.png) no-repeat fixed bottom left;
width:100%;
min-height:100%;
height:auto !important;
height:100%;
}
.divBG2 {
background:url(image3.png) no-repeat fixed bottom right;
width:100%;
min-height:100%;
height:auto !important;
height:100%;
}

 

Now the problem pops up with divBG2. It has not the 'prommised' height:100%;. divBG2 has the height of the content inside it.

The website content needs lay on top of the three backgrounds. I also attached the files.

 

Does someone has an idea?

Cheers,

Snoep.

 

[attachment deleted by admin]

Link to comment
Share on other sites

Remove these:

.divBG1 {
background:url(image2.png) no-repeat fixed bottom left;
width:100%;
//min-height:100%;
//height:auto !important;
height:100%;
}
.divBG2 {
background:url(image3.png) no-repeat fixed bottom right;
width:100%;
//min-height:100%;
//height:auto !important;
height:100%;
}

Link to comment
Share on other sites

Hi,

 

Thank you for the reply. I already tried setting the height:100%. The backgrounds of the div elements will then dissapear when you scroll vertical. Resize the window for a vertical scrollbar and then scroll completly down.

 

Do you have any other idea?

 

snoep

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.