Jump to content

[SOLVED] Background Images and Sticky Footer


gevans

Recommended Posts

Hey guys, Hopefully someone can give me a hand with this.

 

I have two main divs on my page; #wrapper and #footer. Using css as following to get a sticky footer;

 

/**
* STICKY FOOTER
*/
html,body{
    height: 100%;
}
#wrapper{
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -50px; /* the bottom margin is the negative value of the footer's height */
}
#push{
    height: 50px;
}

 

#push is the last div inside #wrapper used to properly install the sticky footer.

 

That works perfectly. I have a 2000px high background image that sticks to the bottom and repeats in the x axis. (sticking to the bottom due to a gradient). That's assigned to #wrapper

 

When the page is over 2050px high I get white space where the background has run out (at the top). I have another background image attached to body for that. That works fine excpet for one problem. once the scrollable height is passed 2050px + 100% I get white space in the middle.

 

To explain this better I've attached a slim screenshot of the problem. Due to the background image being very subtle I've drawn in two lines so you can easily find the cut off points.

 

[attachment deleted by admin]

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.