asfman
有些事,我们明知道是错的,也要去坚持,因为不甘心;有些人,我们明知道是爱的,也要去放弃,因为没结局;有时候,我们明知道没路了,却还在前行,因为习惯了。
posts - 88,  comments - 180,  trackbacks - 0
 "float: right" bug in IE :在IEfloat-right外围容器中文字不见了!
  css :

body {
 margin: 10px 50px;
}
#contener {
 border: 1px solid #000;
 background-color: yellow;
}
#floatRight {
 float: right;
 border: 1px solid red;
 color: red;
 width: 30%;
}
#contenu {
 border: 1px solid blue;
 color: blue;
}
.spacer {
 clear: both;
 border: 1px solid #FF00FF;
 color: #FF00FF;
}

   xhtml :

  

<div id="contener">
 <b>#contener</b>
 <div id="floatRight">
 <b>#floatRight</b> : Float block at the right of the block #contenu
 </div>
 <div id="contenu">
 <b>#contenu</b> : Simple block
 </div>
 <div class='spacer'>
 <b>.spacer</b> : a "spacer" block...
 </div>
</div>

   正确应该显示为:

 

  Internet Explorer 6 显示为 :

  #contener 层的文字和#contenu层不见了! 只有#contener的背景颜色!

  解决办法 :

body {
 margin: 10px 50px;
}
#contener {
 position: relative; /* 增加的 */
 border: 1px solid #000;
 background-color: yellow;
}
#floatRight {
 position: relative; /* 增加的*/
 float: right;
 border: 1px solid red;
 color: red;
 width: 30%;
}


Read More,Comments(0)
 


[xhtml/css]float:right
by banket posted at oioj on 2006-6-29 16:49:59 Weather: 晴

  "float: right" bug 在IE中float-right外围容器的margin-left失效.

  css :

body {
 margin: 0px;
}
#contener {
 border: 1px solid #000;
 margin: 10px 50px;/*左右外补丁margin=50px*/
}
#floatRight {
 float: right;
 border: 1px solid red;
 color: red;
 width: 30%;
}
#contenu {
 border: 1px solid blue;
 color: blue;
}
.spacer {
 clear: both;
 border: 1px solid #FF00FF;
 color: #FF00FF;
}

   xhtml :
  

<div id="contener">
 <b>#contener</b>
 <div id="floatRight">
 <b>#floatRight</b> : Float block at the right of the block #contenu
 </div>
 <div id="contenu">
 <b>#contenu</b> : Simple block
 </div>
 <div class='spacer'>
 <b>.spacer</b> : a "spacer" block...
 </div>
</div>

   正确显示为:

   

  Internet Explorer 6 显示为:

 
 

  IE6.0中#contener的margin-left无效!
  解决办法:

body {
 margin: 10px 50px; /* 给body增加marign */
}
#contener {
 border: 1px solid #000;
 /* margin: 10px 50px; 取消#contener的margin,也就是给他外围增加margin替代自身margin*/
}


[xhtml/css]float:right 
"float: right" bug 在IE中float-right外围容器的margin-left失效.

  css :

 

body {
 margin: 0px;
}
#contener {
 border: 1px solid #000;
 margin: 10px 50px;/*左右外补丁margin=50px*/
}
#floatRight {
 float: right;
 border: 1px solid red;
 color: red;
 width: 30%;
}
#contenu {
 border: 1px solid blue;
 color: blue;
}
.spacer {
 clear: both;
 border: 1px solid #FF00FF;
 color: #FF00FF;
}

   xhtml :
  

<div id="contener">
 <b>#contener</b>
 <div id="floatRight">
 <b>#floatRight</b> : Float block at the right of the block #contenu
 </div>
 <div id="contenu">
 <b>#contenu</b> : Simple block
 </div>
 <div class='spacer'>
 <b>.spacer</b> : a "spacer" block...
 </div>
</div>

   正确显示为:

   

  Internet Explorer 6 显示为:

 
 

  IE6.0中#contener的margin-left无效!
  解决办法:

 

body {
 margin: 10px 50px; /* 给body增加marign */
}
#contener {
 border: 1px solid #000;
 /* margin: 10px 50px; 取消#contener的margin,也就是给他外围增加margin替代自身margin*/
}


posted on 2006-07-12 14:03 汪杰 阅读(166) 评论(0)  编辑 收藏 引用 所属分类: div css dhtml

每天10分钟,轻松学英语
专题:iPad  jQuery  Chrome OS
博客园首页  IT新闻  程序员微博  招聘频道  学英语
标题  
姓名  
主页
验证码 *
内容(提交失败后,可以通过“恢复上次提交”恢复刚刚提交的内容)
 
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
[使用Ctrl+Enter键可以直接提交]
Windows 7专题

相关链接:

<2009年12月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

常用链接

留言簿(14)

随笔分类

随笔档案(88)

文章分类(660)

文章档案(637)

收藏夹

http://blog.csdn.net/prodigynonsense

最新随笔

搜索

  •  

积分与排名

  • 积分 - 147797
  • 排名 - 9

最新随笔

最新评论

阅读排行榜

评论排行榜