I cannot seem to get my background image to stretch vertically (with CSS) and have not been able to get it.. What’s the best way to do this without using a jquery plugin?
Currently have
div#whitewrap {position:fixed; top:0; left:0; width:100%; height:100%;}
Although the question is unclear, I assume you want the houses to appear at the bottom of the page?
The
bodydoes not fill the screen unless it has to. Thus, yourwhitewrapdiv only fills 100% of thebody.Either you need to set the body height to 100% too (although this is slightly hacky) or set the background of the
bodyto the image. This will then have the background image at the bottom of the screen (despite the body not being the full height – confusing right?).Your HTML is hard to inspect however, due (I assume) to the software you used to create it adding in more
divs than I thought possible!EDIT: after closer inspection, it looks as if you need to set the
background-positionattribute to force the image to the bottom. Then, you can set thebackground-colorto be the same as the colour of the sky at the top of the image. This should create the effect you desire without having to actually stretch & distort your image.