这段代码右上角怎么有缺口呢?
左上,左下,右下三个角都能封住,怎么右上角有缺口呢?
请问什么地方设置不对啊。
另外,不能把etlDiv给设置成四条边的形式。
代码如下:
- HTML code
<!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style type="text/css"> <!-- #spaceDiv{ border-bottom:1px solid #fa7023; } .threeBorderShow{ display:block; width:100%; height:400px; border-bottom:1px solid #fa7023; border-left:1px solid #fa7023; border-right:1px solid #fa7023; } --></style> </head> <body> <table border="0" cellspacing="0px" cellpadding="0px" width="100%" height="100%"> <tr> <td width="100%" valign="bottom"><div id="spaceDiv"> </div></td> </tr> <tr> <td colspan="1"> <div id="etlDiv" class="threeBorderShow"> 12333 </div> </td> </tr> </table> </body></html>[解决办法]
我试了下是左上和右上都有缺口。。。
楼主可以设这调一下样式: height:565px。
.threeBorderShow{
display:block;
width:100%;
height:565px;
border-bottom:1px solid #fa7023;
border-left:1px solid #fa7023;
border-right:1px solid #fa7023;
}
[解决办法]
.threeBorderShow{
display:block;
width:100%;
height:400px;
border-bottom:1px solid #fa7023;
border-left:1px solid #fa7023;
border-right:1px solid #fa7023;
}
a. width:100%与width:auto表现有差异,去掉width:100%规则。求大牛解释。
b. div本就是块级元素,无须display规则。
[解决办法]
- HTML code
<!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style type="text/css"> <!-- #spaceDiv{ width:100%; height:0px; border-bottom:1px solid #fa7023; border-left:1px solid #fa7023; border-right:1px solid #fa7023; } .threeBorderShow{ display:block; width:100%; height:400px; border-bottom:1px solid #fa7023; border-left:1px solid #fa7023; border-right:1px solid #fa7023; } --></style> </head> <body> <table border="0" cellspacing="0px" cellpadding="0px" width="100%" height="100%"> <tr> <td width="100%" valign="bottom"><div id="spaceDiv"> </div></td> </tr> <tr> <td colspan="1"> <div id="etlDiv" class="threeBorderShow"> 12333 </div> </td> </tr> </table> </body></html>
[解决办法]
- HTML code
<!DOCTYPE HTML><html><head> <meta charset="gb2312" /> <title></title> <style type="text/css"> #spaceDiv { border-bottom: 1px solid #fa7023; } .threeBorderShow { display: block; width: auto; height: 400px; border-bottom: 1px solid #fa7023; border-left: 1px solid #fa7023; border-right: 1px solid #fa7023; } </style></head><body> <table border="0" cellspacing="0px" cellpadding="0px" width="100%" height="100%"> <tr> <td width="100%" valign="bottom"> <div id="spaceDiv"> </div> </td> </tr> <tr> <td colspan="1"> <div id="etlDiv" class="threeBorderShow"> 12333 </div> </td> </tr> </table></body></html>
[解决办法]
with:100%.改成with:auto
[解决办法]
5楼和6楼的测试正确