That's tricky, and I'd suggest an alternative. IMHO, having the background extend below the footer like that if really fugly and looks unprofessional. Personally, I prefer the footer background to fill any remaining space at the bottom of the page, so I set the body background color as the footer color, so that there's never a gap at the bottom. That way, you also get out of this problem. With this setup, you can then set the background image on the content area and use background-size: cover.