注册 登录
编程论坛 WEB前端(UI)

DIV+CSS一个布局小问题(急...)

点来店趣 发布于 2007-04-06 18:41, 681 次点击

<table width="990" border="0" cellspacing="0" cellpadding="0" bgcolor="#de0505" height="5">
<tr>
<td></td>
</tr>
</table>



<style type="text/css">
#xx {
background-color:#de0505;
height: 5px;
width: 990px;
}
</style>

<div id="xx"></div>


怎么不一样
后者的高度怎么不是5像素??

5 回复
#2
lmhllr2007-04-07 11:16


<style type=\"text/css\">
#xx {
    background-color:#de0505;
    height: 5px;
    width: 990px;
    overflow: hidden;
}
</style>


<div id=\"xx\"></div>

#3
点来店趣2007-04-08 08:50
已经解决!!但还是谢谢  lmhllr
#4
lmhllr2007-04-08 19:25
怎么解决的呢?能说出来分享下让我们学习下吗?谢谢!
#5
点来店趣2007-04-12 19:36
一种方法和你的一样加上overflow: hidden;

另外一种是加line-height: 5px 定义字体!!

因为IE默认是13PX的字体!!!
#6
feiya2007-04-13 11:26
不错不错!
1