我正在尝试在 HTML 表格设计中创建一个日历,使用 CSS 元素 div 元素作为绝对定位的约会块,这工作正常,但由于该块是绝对的,这使我能够重叠尽可能多的行,因为我想创建约会,它不会水平伸展,这是我想要的。如何使绝对 div 块拉伸?还是有更好的解决方案?(约束:必须支持 IE6+)。该问题在下面突出显示。
以下是代码片段示例:
<table class="calendar_dayview_tableformatting">
..
<tr>
<td class="calendar_dayview_cell">
a href="#" class="calendar_dayview_dayformatting">09</a>
<div class="preference">
<div class="preference_appointment"></div>
</div>
</td>
</tr>
</table>
.preference {height: 60px; min-width:445px ; border: 1px solid #ffc61e; background-color: #ffc61e; margin-top: -1.4em; margin-left:2.5em; position:relative;}
.preference_appointment {height: 180px; min-width:445px ; border: 1px solid black; background-color: #f9eaad; position:absolute; margin-top:-1px;z-index:1;}