CSS auto resize div?

I am trying to create a layout using css, I have one main container (div) and two inner containers (div_upper and div_lower). let's say I want to resize div_upper and div_lower will automatically resize and both divs will still fit in the main container. I'm sure this can be done in javascript, but is there any CSS for this? if i was glad.

+6
html css
source share
3 answers

Perhaps this blogpost on the A List Apart site will help you in the right directions.

+3
source share

Another solution:

Use this class to get the vertical vertical height -

.getAutoHeight { position: relative; overflow: auto; /* edit by thobens: overflow: hidden seems to be better, as (at least) IE 8 shows always a disabled scrollbar with overflow: auto */ } <div class="getAutoHeight "> any content<br /> any content<br /> any content<br /> any content<br /> </div> 
+7
source share

CSS3 resize :

 .thisDiv {resize:both;} 
+2
source share

All Articles