Reputation: 1679
I have one div which is dynamic and getting the increments in the css dynamically from jquery to fit the contents if they are larger.
now the problem is that there is one popup associated with the same div.
if content increase that popup's comes down, I don't know how to solve this issue . please help.
HTML
< div id='main_div' >
< div id='myid' >some info< /div >
< div id='popup' >< /div >
< /div >
< input type='button' id='incre' >
jQuery:
$("#incre").click(function()
{
$("#myid").html(" some more some more some more some more some more some more some more some more some more some more some more some more some more some more some more some more some more some more some more some more some more ");
});
Thanks advance Dave
Upvotes: 0
Views: 294
Reputation: 1679
I have increased the height of 'main_div' manually. and inserted the popup under that. and that worked.
Thanks all of you.
Upvotes: 0
Reputation: 5573
Have you tried using position absolute on the popup? Then the popup will not be affected by the height of the content div as it will be taken out of the flow of the document
Upvotes: 0
Reputation: 8117
Set max height for this div. When content increases beyond this max height, use scrollbar to scroll contents.
div{
max-height:300px;
height:auto !important; // for ie as it does not support max-height
height:300px; // for ie as it does not support max-height
overflow:auto;
width:auto
}
Upvotes: 1