下面 _left是不是写错了,还有,这个作用是什么???
.Left
{
background: #333;
width: 300px;
margin-left: -100%;
position: relative;
right: 300px;
_left: 250px;
}<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>三栏等高(wwww.hemin.cn)</title>
<style type="text/css">
.Middle, .Left, .Right
{
float: left;
padding-bottom: 32767px;
margin-bottom: -32767px;
}
.Content
{
overflow: hidden;
padding: 0 250px 0 300px;
zoom: 1;
position: relative;
}
.Middle
{
background: #090;
width: 100%;
}
.Left
{
background: #333;
width: 300px;
margin-left: -100%;
position: relative;
right: 300px;
_left: 250px;
}
.Right
{
background: #666;
width: 250px;
margin-right: -100%;
}
#wrapper
{
text-align: left;
width: 960px;
margin: 0 auto;
}
body
{
text-align: center;
}
</style>
</head>
<body>
<div id="wrapper">
<div class="Content">
<div class="Middle">
中间</div>
<div class="Left">
左边
</div>
<div class="Right">
右边
</div>
</div>
</div>
</body>
</html>
.Left
{
background: #333;
width: 300px;
margin-left: -100%;
position: relative;
right: 300px;
_left: 250px;
}<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>三栏等高(wwww.hemin.cn)</title>
<style type="text/css">
.Middle, .Left, .Right
{
float: left;
padding-bottom: 32767px;
margin-bottom: -32767px;
}
.Content
{
overflow: hidden;
padding: 0 250px 0 300px;
zoom: 1;
position: relative;
}
.Middle
{
background: #090;
width: 100%;
}
.Left
{
background: #333;
width: 300px;
margin-left: -100%;
position: relative;
right: 300px;
_left: 250px;
}
.Right
{
background: #666;
width: 250px;
margin-right: -100%;
}
#wrapper
{
text-align: left;
width: 960px;
margin: 0 auto;
}
body
{
text-align: center;
}
</style>
</head>
<body>
<div id="wrapper">
<div class="Content">
<div class="Middle">
中间</div>
<div class="Left">
左边
</div>
<div class="Right">
右边
</div>
</div>
</div>
</body>
</html>
利用ie6的bug,只有ie6认识
这个是查找相关知识不同浏览器对盒模型或者css的解析 有区别,利用css hack可以消除这些区别
{
background: #333;
width: 300px;
margin-left: -100%;
position: relative;
right: 300px;
_left: 250px;
}
为什么刚好是250px 而不是其他呢?
正解_left代码没错 加上是非常有必要的
但是如果这个250px是否合适
这谁也不知道
只能看平面设计图来算了