...

View Full Version : CSS/HTML height multiples



kidfiction
12-21-2006, 01:31 PM
Hello, I am creating a site using CSS and HTML (I do have access to php if need be), the main image for my background fits seamlessly into a header and footer, but is quite unique. Now the header and the footer are just vertical flips of eachother so the layout would look something like this:

111
aaa
bbb
ccc
ccc
bbb
aaa
111

where the 111's are the header/footer and the rest is the background image. Is there any way in CSS or HTML that I can tell the page to display a multiple of the background image height so I do not end up with something like:

111
aaa
bbb
ccc
ccc
bbb
111

for example say the content was larger than one height of the background image, the site would display:
111
aaa
bbb
ccc
ccc
bbb
aaa
aaa
bbb
ccc
ccc
bbb
aaa
111


thank you very much.

ahallicks
12-21-2006, 02:37 PM
If you set height to auto it will stretch the height of the content that fills it, is that what you want? As long as you had background repeat set to repeat-y it would repeat it for as long as the div stretched.

However, you may need to set a minimum height for the content div so that if there is not enough content to fill your background image it will remain at least a certain size.

blueskyz
12-21-2006, 02:44 PM
if i understand this correctly wouldn't the following work?

#content{
min-height:200%;
/height:200%; (for the benefit of IE)
}

I've never had to do this before because i normally have my content div automatically extend/wrap around the contents



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum