ki Posted September 29, 2012 Share Posted September 29, 2012 I have a code code right now which works but I want it to form to the height of the text, with mine I cant edit it unless I make specific values which some content will be dynamic and cant be determined. here's my code: <div id="div-overlay" onclick="javascript: closePopup();"></div> <div id="div-popup"></div> div#div-overlay { position: absolute; top: 0; left:0; width: 100%; height: 100%; background: #000; display: none; opacity: .5; filter: alpha(opacity=40); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; } div#div-popup { position: absolute; top: 50%; left: 50%; margin-left: -200px; margin-top: -200px; width: 400px; height: 400px; display: none; background: #FFFFFF; padding: 20px; -moz-border-radius: 7px; -webkit-border-radius: 7px; } wat do? Quote Link to comment Share on other sites More sharing options...
Christian F. Posted September 29, 2012 Share Posted September 29, 2012 By defining the height to "auto" it'll conform to the height of the content, no more no less. So the correct answer would be: By not specifying a specific heigh, either relative or static. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.