css:表格高度不配合
我无法将表格“嵌入”到另一个任意高/短的 div 中:
#header table.rates {
float: left;
width: 210px;
border: 1px solid black;
border-collapse: collapse;
padding:0;
margin: 5px;
font-family: Verdana, Helvetica, Arial;
font-size: 10px;
}
#header {
clear:both;
float:left;
width:100%;
border-bottom:1px solid #000;
background: #9c9;
padding-top: 10px;
padding-bottom: 10px;
font: small-caps 40px/40px "Times New Roman", serif;
color: #282;
}
在 html 中,它是 ......
表格垂直扩展标题 div,无论对 tr、td
或 table
元素进行多少修改都无法使其配合。我缺少什么?
I can't make a table I've 'embedded' in another div arbitrarily tall/short:
#header table.rates {
float: left;
width: 210px;
border: 1px solid black;
border-collapse: collapse;
padding:0;
margin: 5px;
font-family: Verdana, Helvetica, Arial;
font-size: 10px;
}
#header {
clear:both;
float:left;
width:100%;
border-bottom:1px solid #000;
background: #9c9;
padding-top: 10px;
padding-bottom: 10px;
font: small-caps 40px/40px "Times New Roman", serif;
color: #282;
}
And in the html it's <div id='header'>...<table class='rates'>...
The table vertically expands the header div and no amount of tinkering with the tr, td
or table
elements will get it to cooperate. What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,这里的网络干扰各位,问题出在
#header {
字体:小型大写字母 40px\40px“Times New Roman”、衬线体;
}
将该行修改为
font:small-caps 40px "Times New Roman", serif;
允许我根据需要访问表格的高度属性。里尔
Sorry for the cyber-perturbation here folks, the problem was with
#header {
font: small-caps 40px\40px "Times New Roman", serif;
}
Modifying the line to
font: small-caps 40px "Times New Roman", serif;
allowed me access to my table's height properties, as desired.Lille