Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Show entire background image


lucy24 - 11:20 pm on Jun 21, 2011 (gmt 0)


The CSS doesn't know how big the background is. Foreground, of course, would be no problem: unless you tell it otherwise, the container will expand to fit what it's holding. If only our clothes, garages and toolboxes could do the same :(

So your basic choices are to use javascript to get the right-here-and-now-value, or to set the div height to the largest value it could possibly be. Which would leave you with an unattractive gap at the bottom. Degree of unattractiveness would in turn depend on just how wide a range of heights you're dealing with. Is the background image completely out of your control?


Thread source:: http://www.webmasterworld.com/css/4328945.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com