正 文

DIV浮动IE文本出现3px间距的bug


www.7dspace.com  更新日期:2005-12-12 6:34:55  七度空间


修正过:(加了以下代码)

* html #floatbox {
margin-right: -3px;
}
* html p {
height: 1%;
margin-left: 0;
}

不考虑mac下ie5.02

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
 <title></title>
 <style type="text/css">
 <!--
 *{
  padding: 0;
  margin: 0;
 }
 #layout{
 background: #F1F1F1;
 width: 400px;
 float: left;
 }
 #floatbox {
 float: left;
 width: 100px;
 height: 50px;
 background: #6d6;
 }
 p {
 margin: 0 0 0 100px;
 background: #dd9;
 }
 * html #floatbox {
 margin-right: -3px;
 }
 * html p {
 height: 1%;
 margin-left: 0;
 }
 -->
 </style>
</head>

<body>
<div id="layout"><div id="floatbox">floatbox</div><p>现在没有3px了</p><p>现在没有3px了</p></div>
</body>
</html>

2页,页码:[1] [2] 

上一篇:用GoLive实现CSS+DIV之一
下一篇:命令行下的Java开发
作者:forestgan  来源:蓝色理想 ( 责任编辑:7dspace )
收藏此页】【打印】【关闭
站 内 搜 索
 

热 点 导 读
特 别 推 荐