Ok so i have a div that acts as a background for two divs(filled with text) that are nested inside this div. Only one of these two divs are shown at one time (toggled by a button) since these divs vary in size, the div grows to accommodate the text. But i want the div to stop growing beyond 343 and since overflow:auto is already applied to the div, the content would become scrollable. but this is not happening, the toggle works perfect but the div just grows to an enormous size, rather than stopping at 343px.
heres the fiddle: http://jsfiddle.net/7Az3D/
Ok so i have a div that acts as a background for two divs(filled
Share
Whichever div you don’t want to grow, just give it a max-height property. Eg: