wading_in_html Posted June 11, 2007 Share Posted June 11, 2007 ok i have a div with a background image that is larger than the screen. i want it to size the div such that the image will continue to the end of the content, or to the end of the page, whichever comes last.if i do size=100% then it will cut off the image when you scroll downand the default makes it stop before the end of the page if the content doesnt fill up the pageand i dont really want to fill up the page with line breakscan anyone think of a way to do it?thanks :)EDIT: whoops just realized i accidentally put this in css. mods plz move? Link to comment Share on other sites More sharing options...
ATM Posted June 14, 2007 Share Posted June 14, 2007 Sorry, I didn't really understand you, but I think this will help what your trying to do.View the properties to the image and look at its height and width.Then base the size of the div on the width and height of the image.I think this topic should be in CSS well as long as your using CSS to set the size of the div. Link to comment Share on other sites More sharing options...
smartalco Posted June 14, 2007 Share Posted June 14, 2007 it should already do that with repeating... well, as long as your div is the entire page, which i doubtyou could just set your page background to the background you wantor one final option would be setting the div to a fixed position so it wont move even when scrolling the page up and down (note: if you use this option, dont put anything else in this div...) Link to comment Share on other sites More sharing options...
thesi Posted June 14, 2007 Share Posted June 14, 2007 If you know how tall the picture is, you can always set the div using min-height. That way if you haven't filled the page, you still have the div filling the whole space. Explanation at http://www.w3schools.com/css/pr_dim_min-height.asp. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.