正 文

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


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


发生场合:当左边对象是浮动的,右边对象采用外补丁的左边距来定位,则右边对象内的文本会离左边有3px的空白误差。

没加修正:

<!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;
 }
 
 -->
</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 )
收藏此页】【打印】【关闭
站 内 搜 索
 

热 点 导 读
特 别 推 荐