javascript - Dynamic div content, but need a fixed div height -


I am using javascript to animate the div collapsing / sliding. In javascript, div is required to set height, although the contents inside the div are dynamic. How would I have to go about doing this work, because I would not want to div any larger means. I have set the height of such a div:

  & lt; Div id = "main-div" style = "overflow: hidden; height: 95px;" & Gt;  

I have tried setting the height to 'auto', but when the divio slides are open again, it does not slide to the correct height. Need?

You do not want to 'auto' that means that "the height of the box fits to the content height Doing "" Are you saying that setting up the height attribute is not working? What's your full div markup?


Comments