tags:

views:

33

answers:

1

Hi there,

I have a simple but annoying problem. I need to set min-height AND max-height of a div element.

For example min-height could be 100px and max-height 200px. I load my page with div height 200px. If i squeeze my browser window, this div resizes and when it hits height=100px it stops resizing.

Of course min-height and max-height in css is not working :/

Anyone?

Thanks.

A: 

Also set height.

min-height: 100px;
max-height: 200px;
height: 100%;
Sjoerd
Not working either :[ It just sets height to 200px and when i squeeze my broser window it doesn't shrink to 100px. It just stays with 200px height.#wrap { background: #ff0000; min-height: 100px; max-height: 200px; height: 100%; width: 100%;}
Pon
@Pon: That does work. You must have something else on your page that is interfering. Can you produce a minimal example with that style that doesn't work for you? Also, what browser are you testing in?
Isaac Truett