日期:2014-05-18  浏览次数:20446 次

一个DIV定位的问题
我想把三个DIV放到一行;
代码如下:
<div   style= "WIDTH:   570px ">
<div   id= "divIamge "> <IMG   src= "../ayimage/ad08.gif "> </div>
<span   style= "FLOAT:   left ">
<DIV   id= "divTypeText "   style= "BORDER-RIGHT:   1px;   BORDER-TOP:   1px;   MARGIN-TOP:   5px;   BORDER-LEFT:   1px;   WIDTH:   184px;   BORDER-BOTTOM:   1px;   HEIGHT:   185px ">
<div   id= "divTitle "   style= "HEIGHT:   18px;   BACKGROUND-COLOR:   #e6f4fc "> <span   style= "FLOAT:   left "> <A   class= "title1 "   href= "# "> title </A> </span> <span   style= "FLOAT:   right "> <A   class= "title1 "   href= "# "> more </A> </span> </div>
<div   id= "divMore ">
<li>
3
<li>
4
<li>
5
</li>
</div>
</DIV>
</span>
<!--   ---> <span   style= "MARGIN-RIGHT:   auto ">
<DIV   id= "divTypeText "   style= "BORDER-RIGHT:   1px;   BORDER-TOP:   1px;   MARGIN-TOP:   5px;   BORDER-LEFT:   1px;   WIDTH:   184px;   BORDER-BOTTOM:   1px;   HEIGHT:   185px ">
<div   id= "divTitle "   style= "HEIGHT:   18px;   BACKGROUND-COLOR:   #e6f4fc "> <span   style= "FLOAT:   left "> <A   class= "title1 "   href= "# "> title </A> </span> <span   style= "FLOAT:   right "> <A   class= "title1 "   href= "# "> more </A> </span> </div>
<div   id= "divMore ">
<li>
3
<li>
4
<li>
5
</li>
</div>
</DIV>
</span>
<!------> <span   style= "MARGIN-LEFT:   auto ">
<DIV   id= "divTypeText "   style= "BORDER-RIGHT:   1px;   BORDER-TOP:   1px;   MARGIN-TOP:   5px;   BORDER-LEFT:   1px;   WIDTH:   184px;   BORDER-BOTTOM:   1px;   HEIGHT:   185px ">
<div   id= "divTitle "   style= "HEIGHT:   18px;   BACKGROUND-COLOR:   #e6f4fc "> <span   style= "FLOAT:   left "> <A   class= "title1 "   href= "# "> title </A> </span> <span   style= "FLOAT:   right "> <A   class= "title1 "   href= "# "> more </A> </span> </div>
<div   id= "divMore ">
<li>
3
<li>
4
<li>
5
</li>
</div>
</DIV>
</span>
</div>


------解决方案--------------------
div的外层套个table咯
------解决方案--------------------
嗯,使用浮动就可以了,想怎么放都行,呵
------解决方案--------------------
最好不要去用span
用div的float就可以搞定一切
--