<tr>
<th width="200">
<div id="id_chQueryTh" class="frontTh" onclick="changeTable('query');" style="float:left;width:100;">
查询。。件</div>
<div id="id_chListTh" class="behindTh" onclick="changeTable('list');" style="float:right;width:100;">
显示结果</div>
</th>
<td width="600" align="right">
<div style="position: absolute; left: 212px; top: 20px; width: 600px;border-bottom:1px #000000 solid;">
。。事项综合查询</div>
</td>
</tr>
有谁能告诉我怎样在FF下让这两个DIV同行显示吗?试了N种方法总是出问题,IE下正常但FF下第二个DIV会在第二行显示
<th width="200">
<div id="id_chQueryTh" class="frontTh" onclick="changeTable('query');" style="float:left;width:100;">
查询。。件</div>
<div id="id_chListTh" class="behindTh" onclick="changeTable('list');" style="float:right;width:100;">
显示结果</div>
</th>
<td width="600" align="right">
<div style="position: absolute; left: 212px; top: 20px; width: 600px;border-bottom:1px #000000 solid;">
。。事项综合查询</div>
</td>
</tr>
有谁能告诉我怎样在FF下让这两个DIV同行显示吗?试了N种方法总是出问题,IE下正常但FF下第二个DIV会在第二行显示
浮动
div包含table
堆积木
position: absolute; left: 212px; top: 20px(可以的话去掉吧)
to:hch126163,试过了,pad都设为了0
to:hnxxwyq,因为TH的宽度是200,所以每个DIV都设为了100
to:LXH060204,是想画一根线,恰好和两个DIV连起来,我是想不用背景图片实现换页效果
to:jinfengyiye,嗯,我也试了,如果不加上class的话就能同行,但是我想通过在点击的时候变动DIV的CLASS来实现换页效果
另外贴上我的class给大家看看,我把原来放在div上的style全部放到了class里,但还是不行...
.frontTh{
color:#000000;
margin-bottom:1px;
display:block;
padding-left:0px;
padding-right:0px;
padding-top:0px;
background-color:#ffffff;
text-decoration: none;
line-height:20px;
width:100px;
float:left;
border-left-style:solid; border-left-width:1px; border-right-style:solid; border-right-width:1px; border-top-width:1px; border-top-style:solid; border-bottom-width:1px
}
.behindTh{
color:#bfbfbf;
margin-bottom:1px;
display:block;
padding-left:0px;
padding-right:0px;
padding-top:0px;
border-bottom:1px #000000 solid;
background-color:#e9e9e9;
text-decoration: none;
line-height:20px;
width:100px;
float:left;
}
不知道怎么回事,IE里一切正常,FF里怎么搞都会变两行,郁闷,有没有高人解决过这个问题呢
但至少在我们公司,还有90%以上的人在用IE6,少数用IE7或IE8
没一个用FF的
唉,所以做东西,还得以IE6为标准
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css">
.frontTh{
color:#000000;
margin-bottom:1px;
display:block;
padding-left:0px;
padding-right:0px;
padding-top:0px;
background-color:#ffffff;
text-decoration: none;
line-height:20px;
width:100px;
float:left;
/*你这里的设置了div的border左右各1px,那么在ff中这个div的宽度就是102px*/
border-left-style:solid; border-left-width:1px; border-right-style:solid; border-right-width:1px; border-top-width:1px; border-top-style:solid; border-bottom-width:1px
}
.behindTh{
color:#bfbfbf;
margin-bottom:1px;
display:block;
padding-left:0px;
padding-right:0px;
padding-top:0px;
border-bottom:1px #000000 solid;
background-color:#e9e9e9;
text-decoration: none;
line-height:20px;
width:100px;
float:left;
}
</style>
</head>
<body>
<table>
<tr>
<!--这里改为202px-->
<th width="202">
<div id="id_chQueryTh" class="frontTh" onclick="changeTable('query');" style="float:left;width:100;">
查询。。件
</div>
<div id="id_chListTh" class="behindTh" onclick="changeTable('list');" style="float:right;width:100;">
显示结果
</div>
</th>
<td width="600" align="right">
<div style="position: absolute; left: 212px; top: 20px; width: 600px;border-bottom:1px #000000 solid;">
。。事项综合查询</div>
</td>
</tr>
</table>
</body>
</html>
谢谢各位的捧场
.frontTh{
color:#000000;
margin-bottom:1px;
display:block;
padding-left:0px;
padding-right:0px;
padding-top:0px;
background-color:#ffffff;
text-decoration: none;
line-height:20px;
width:100px;
float:left;/* 你这里设置的border左右各1px,那么div的实际宽度是102(ff中)*/
border-left-style:solid; border-left-width:1px; border-right-style:solid; border-right-width:1px; border-top-width:1px; border-top-style:solid; border-bottom-width:1px
}