IE6为何浏览Css 结果不一样?

Stevenking1978 2008-11-10 05:41:15
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>

<!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 type ="text/css" >
body{
margin:0px;
padding:0px;
}
#head
{
clear:both ;
width:100%;
height :120px;
background: red ;
}
#Side_left
{
float:left;
width:50%; height:500px;
border-right-color:Black;
border-right-style :solid ;
border-right-width:1px;
background: yellow ;
}
#Side_right
{
clear:both ;
width:50%;
height:500px ;
float:right ;
background: #5a7edc ;
padding-top:150px;
padding-left:5px;

}
#Container /*Div 容器*/
{
position:relative ;
width:100%;
margin:0 auto;
}

#Side_right div.Drow /*右边窗体 子窗体*/
{
clear:both ;
float:left ;
width:100%; height:50px;
border-bottom:solid red 1px;
margin-top:50px;
}
#Side_right div.ConLab /*Div 标签*/
{
float:left ;
width:auto ;height:20px;
border:solid black 1px;
padding:3px;
}
#Side_right div.ConTxt /*Div 文本*/
{
float:left ;
width:auto ;height:24px;
border:solid black 1px;
padding:1px;

}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="Container">
<div id="head">head</div>
<div id="Side_left">left
</div>
<div id ="Side_right">Side_right
<div class="Drow">
<div class="ConLab" >
<asp:Label ID="Label1" runat="server" Text="用户名:" ></asp:Label>
</div>
<div class="ConTxt" >
<asp:TextBox ID="TxtId" runat="server"></asp:TextBox>
</div>
</div>
<div class="Drow">
</div>
</div>
</div>
</form>
</body>
</html>
以上是我需要的结果,但是我把下面代码放到logo.Css后用浏览器浏览,发现side_right 的内容变了
body{
margin:0px;
padding:0px;
}
#head
{
clear:both ;
width:100%;
height :120px;
background: red ;
}
#Side_left
{
float:left;
width:50%; height:500px;
border-right-color:Black;
border-right-style :solid ;
border-right-width:1px;
background: yellow ;
}
#Side_right
{
clear:both ;
width:50%;
height:500px ;
float:right ;
background: #5a7edc ;
padding-top:150px;
padding-left:5px;

}
#Container /*Div 容器*/
{
position:relative ;
width:100%;
margin:0 auto;
}

#Side_right div.Drow /*右边窗体 子窗体*/
{
clear:both ;
float:left ;
width:100%; height:50px;
border-bottom:solid red 1px;
margin-top:50px;
}
#Side_right div.ConLab /*Div 标签*/
{
float:left ;
width:auto ;height:20px;
border:solid black 1px;
padding:3px;
}
#Side_right div.ConTxt /*Div 文本*/
{
float:left ;
width:auto ;height:24px;
border:solid black 1px;
padding:1px;

}
//////////////////////////////////////////////////////////////////////////////////////////////
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>

<!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>
<link href="Css/Login.css" rel="stylesheet" type="text/css" />


</head>
<body>
<form id="form1" runat="server">
<div id="Container">
<div id="head">head</div>
<div id="Side_left">left
</div>
<div id ="Side_right">Side_right
<div class="Drow">
<div class="ConLab" >
<asp:Label ID="Label1" runat="server" Text="用户名:" ></asp:Label>
</div>
<div class="ConTxt" >
<asp:TextBox ID="TxtId" runat="server"></asp:TextBox>
</div>
</div>
<div class="Drow">
</div>
</div>
</div>
</form>
</body>
</html>
设计时显示的结果一样
但是用IE浏览后,side_right部分显示不一样。
不知哪位大侠可以帮帮我!




...全文
125 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
风骑士之怒 2008-11-11
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 huoxudong125 的回复:]
ie6布局和火狐不一样,对css标准支持的不是特别好,他有自己一套css解决思路
就是div的盒子问题
[/Quote]
就是div的盒子问题,,这个我以前在一篇网页css十大注意事项文章中看见过,盒子问题
huoxudong125 2008-11-11
  • 打赏
  • 举报
回复
ie6布局和火狐不一样,对css标准支持的不是特别好,他有自己一套css解决思路
就是div的盒子问题
nealwike 2008-11-11
  • 打赏
  • 举报
回复
~ ~
路过..

111,120

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧