javascript - Make <div> scale to content when absolutely positioned? -
usually <div> expand fill content insize.
<div> <p>hello</p> </div> the <div> scales contain <p>
is possible create <div> when it's absolutely positioned?
in case have modal has set height , width, want create scale content.
something this? http://jsfiddle.net/3l99pycm/
css:
div { position: absolute; left: 50%; top: 100px; background-color: red; width: 30%; height: 100px; } p { background-color: blue; color: white; } javascript html css modal-dialog
No comments:
Post a Comment