I have a div with following CSS:
div
{
width:600px;
height:auto;
}
Now my problem is when i append any element (like $('div').append(any element)) in this div its height is not increasing accordingly. Whats the problem?
EDIT
The element which i am appending has height:auto. And the div in which i am appending has empty.
There is no problem with that code. The
autovalue is the default for a div, so (assuming that there is no other style applying to the element) it’s the same as just:So, there is nothing that is limiting the height of the div in that code. You have to look elsewhere in your code to find something that affects the element.
Some browsers let you inspect an element, which shows you exactly what CSS applies to it. I use the Firebug plugin in Firefox for this.