Give help. Get help.
Is there a way in CSS to allow an absolutely positioned element to extend to it’s content’s height?
Because you allow the content to overflow, but the element stays the same height.
Take a look at this and lemme know if I’m just missing something:
[Codepen test case](http://cdpn.io/uBHad “Codepen link”)
To start…why are you using absolute positioning?
You’ve told the parent to be a certain height and it’s obeying. The absolutely positioned element is just doing what you have told it to.
What you seem to be trying to do is force the parent element to respect the height of the child and absolute positioning can’t do that.
You can do something like this: http://codepen.io/Merri/pen/bzCBD
Practical uses for this are quite limited though. If you can define a better use case then answers may improve.
Do you mean a centered dialog?
With some jQuery: http://codepen.io/senff/pen/xCBsn
You must be logged in to reply to this topic.