我有一个 div 用作简单的模态弹出窗口。这个 div 的高度设置为自动,但是当我查看它时,它并没有一直向下扩展以覆盖其中的所有元素。关于如何使 div 高度覆盖所有元素的任何想法?
任何帮助将不胜感激。
谢谢,
这是html
<div id="basic-modal-content">
<h3 id="eventtitle"></h3>
<p>Below you will find information on the clicked event including a brief description, start date, and the end date, location, and a link, if provided.</p>
<br />
<code><span style="color:#A17E13"><b>Description</b></span> - <span style="color:#006400" id="eventdescription"></span></code>
<code><span style="color:#A17E13"><b>Start</b></span> - <span style="color:#006400" id="eventstart"></span></code>
<code><span style="color:#A17E13"><b>End</b></span> - <span style="color:#006400" id="eventend"></span></code>
<code><span style="color:#A17E13"><b>Location</b></span> - <span style="color:#006400" id="eventlocation"></span></code>
<code><span style="color:#A17E13"><b>Link</b></span> - <span style="color:#006400" id="eventurl"></span></code>
<input type="button" id="deletecalendarentry" style="display:none" value="DELETE" />
</div>
这是CSS
#simplemodal-container {height:auto; width:auto; color:#006400; background-image:url(../Images/back.png); border:4px solid beige; padding:12px;}