Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting max-height AND min-height property in CSS (or via jQuery)

Tags:

html

css

xhtml

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

For example: min-height: 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.

like image 296
Pon Avatar asked Oct 23 '25 04:10

Pon


1 Answers

Also set height.

min-height: 100px;
max-height: 200px;
height: 100%;
like image 128
Sjoerd Avatar answered Oct 25 '25 19:10

Sjoerd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!