[急]div relative相对定位时IE7不会撑开父DIV而IE6会
时间:2009-03-23
来源:互联网
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="1.aspx.cs" Inherits="_1" %>
<!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 runat="server">
<title></title>
<style>
div{
border:1px dotted black;
}
#top
{
height:50px;
}
#top1
{
height:10px;
}
#top2
{
position:relative;
height:300px;
width:300px;
left:20px;
top:10px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="top">
<div id="top1"></div>
<div id="top2"></div>
</div>
</form>
</body>
</html>
在IE6中top2会把top撑开,而在IE7中就不会,我现在想按不撑开的显示,也就是IE7的,怎么办??
<!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 runat="server">
<title></title>
<style>
div{
border:1px dotted black;
}
#top
{
height:50px;
}
#top1
{
height:10px;
}
#top2
{
position:relative;
height:300px;
width:300px;
left:20px;
top:10px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="top">
<div id="top1"></div>
<div id="top2"></div>
</div>
</form>
</body>
</html>
在IE6中top2会把top撑开,而在IE7中就不会,我现在想按不撑开的显示,也就是IE7的,怎么办??
作者: snyyh5 发布时间: 2009-03-23
已经解决了
top
{
height:50px;
overflow:hidden;
}
top
{
height:50px;
overflow:hidden;
}
作者: snyyh5 发布时间: 2009-03-23
但是 问题又来了 在firefox下 超出的部分显示不了 在IE6/7下可以!!!
作者: snyyh5 发布时间: 2009-03-23
#top2
{
position:relative;
height:300px;
width:300px;
left:20px;
top:10px;
z-index:1000;
}
{
position:relative;
height:300px;
width:300px;
left:20px;
top:10px;
z-index:1000;
}
作者: peanut_love 发布时间: 2011-05-13
top
{
height:50px;
overflow:hidden;
overflow:;auto!important
}
{
height:50px;
overflow:hidden;
overflow:;auto!important
}
作者: jywcyx 发布时间: 2011-05-13
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28