Wallpaper Div

I just wanted to put bgbottom on the bottom of my body. What happens is the footer is up to the end of the footer and doesn't extend beyond the bottom of the body.

#bgtop {
    background-image:url(images/bgtop.png);
    background-repeat: repeat-x;
}

#bgbottom { background:url(images/bgbottom.png) repeat-x bottom;}

      

Html

<body>
<div id="bgtop"></div>
<div id="bgbottom"></div>

      

+2


a source to share


2 answers


While your question is not clear, I think you want to correct the image at the bottom of the page. If so use CSS propertybackground-attachment: fixed

After re-reading your question a little more, I think you can just increase your height by 100% of the page (again, not really sure)? If so, you can set height: 100%

or you can apply a background image to the tag <body>

:



body { background: #[color] url([image]) repeat-x left bottom; }

      

+1


a source


If 100% height for body tag doesn't work then put bottom div. Set the property of the bottom div to fixed and set the bottom to -1px and left to 0px. This will ensure that the background image pops out from the bottom of the browser window. I think this is the solution to your problem.



#bgbottom { background:url(images/bgbottom.png) repeat-x; position:fixed; bottom:-1px; left:0px;}

      

0


a source







All Articles