- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Can you help me setting the height of #container? I tried everything: overflow:hidden, display:block, height:auto..
As you have absolutely positioned the elements in the container you have taken them out of the document flow so the container now has (effectively) nothing in it….so it collapses.
Why are you positioning these divs that way?
So it’s impossible and I have to find other solution? Ok.
It’s a container for a menu content. At first those divs are all with height:0. When I click on the respective button I have an animation from height:0 to height:100%. I have position:absolute to have them at the same position.
>** I have position:absolute to have them at the same position.**
Why? I’m not sure what it is you are trying to achieve.
If each of those positioned elements are going to be list items then there are **much** better ways of doing what **I think** you are trying to do.
Absolute positioning is the LAST layout method one should use if all other methods have failed.
Because if I don’t have position absolute they all get stacked and not at the same position: http://jsfiddle.net/LJs9J/2/
Not sure why you would want to do that but if you know which div will be tallest, make that one not absolute positioned…?
As I said…
>I’m not sure what it is you are trying to achieve.
Do you have an example of the effect you are after. The animation will almost certianly have **nothing** to do with positioning.