日期:2014-05-17  浏览次数:20542 次

div 定位问题
我们有两个table。中间想要放进去一个图层,这个图层的位置和宽度是要确定的,超过了就会自动换行。
我们自己试了好久,只能做到在IE里自动换行,而且下面的那个table也不动,我们想要下面的table是会跟着下去的。
table里面的内容就省略了
麻烦给写个中间div的定位
代码:
HTML code
<table>
  </table>
<div>

<div id="result"></div>

<div id="paging"></div>
</div>
<table>
</table>


------解决方案--------------------
把你CSS放上来我试试
------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>湘南校园网</title>
<style type="text/css">
.out_div{width:300px; height:auto; float:left;}
.div_cont{width:300px; height:100px; border:1px solid red;float:left;margin:10px 0px;}
#result{width:250px; height:35px; float:left; border:1px solid #ccc;margin-top:5px;}
#paging{width:250px; height:35px; float:left; border:1px solid #ccc;margin-top:5px;}
</style>

</head>

<body>
<div class="out_div">
<table border="1" width="300" height="100">
</table>
<div class="div_cont">

<div id="result"></div>

<div id="paging"></div>
</div>
<table border="1" width="300" height="100">
</table>
</div>
</body>
</html>
看看是不是你要的效果