Firefox 中的 CSS 溢出问题
我有一个表,编码如下;
<table id="c_month_tbl" cellspacing="0" cellpadding="0" border="0" >
<tbody>
<tr>
<td valign="top" class="weekend_days">
<div class="block_out">
<div class="blockout_text">Some content ...Some content ...Some content ...Some content ...Some content ...</div>
</div>
</td>
</tr>
</tbody>
</table>
CSS如下;
td.weekend_days .blockout_text {
margin-top: 14px;
}
.blockout_text {
margin-top: 25px;
padding: 3px;
text-align: center;
}
#c_month_tbl{
clear: both;
width: 678px;
}
.block_out {
height: 50px;
}
现在,如果 td 内的内容较少,布局看起来会很好...但如果内容较多,IE 会扩展单元格宽度/高度并很好地显示内容。
但在 Firefox 中,内容 div 的宽度/高度保持固定,不会根据内容扩展,这使得布局显得有点损坏。
我尝试更改包含 td/div 元素的溢出属性,但它是在 Firefox 中无法正常工作。
请帮我。谢谢。
I have a table coded as follows;
<table id="c_month_tbl" cellspacing="0" cellpadding="0" border="0" >
<tbody>
<tr>
<td valign="top" class="weekend_days">
<div class="block_out">
<div class="blockout_text">Some content ...Some content ...Some content ...Some content ...Some content ...</div>
</div>
</td>
</tr>
</tbody>
</table>
The CSS is as follows;
td.weekend_days .blockout_text {
margin-top: 14px;
}
.blockout_text {
margin-top: 25px;
padding: 3px;
text-align: center;
}
#c_month_tbl{
clear: both;
width: 678px;
}
.block_out {
height: 50px;
}
Now the layout appears fine if the content inside the td is less...But if there is more content, IE kind of expands the cell width/height and displays the content fine.
But in Firefox, the width/height for the content div remains fixed and does not expand as per the content, which makes the layout appear a bit broken..
I tried changing the overflow property for the containing td/div element , but it is not working fine in Firefox.
Please help me. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
删除类
.blockout
,或删除其高度限制。如果您希望其高度至少 50 像素,请改用min-height
。Remove the class
.blockout
, or remove the height restriction on it. If you want it to be at least 50px tall, usemin-height
instead.