tags:

views:

107

answers:

1

Hi there

I have a centered div on my site, using a fixed width and margin:0 auto;

All looks fine in IE, but on FF, for the pages with long content, only the top part of the div has the proper div color, and the rest has the body background color.

what I'm doing wrong?

many thx

A: 

Without seeing your code it's hard to tell, but my bet is that you've set the div height to %100, which means 100% of the viewport.

It will not stretch beyond that, even if the content is long enough. This is the correct behaviour.

To make it the full scree height when there's not enough content, and go beyond the viewport height when there's more than enough content, you'll need to use two divs.

Here's an example I've hosted:

Div height 100% fix

doctororange