+ -
当前位置:首页 → 问答吧 → div左右布局页面 兼容ie6 ie7问题

div左右布局页面 兼容ie6 ie7问题

时间:2010-12-27

来源:互联网

HTML code

<!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" />
<style type="text/css">
#main{
    overflow: hidden;
}
#left{
float:left;
width:252px;
text-align:center;
border:1px solid #000;
padding-bottom: 10000px;
margin-bottom: -10000px;
}
#right{
margin-left:252px;
text-align:center;
border:1px solid #f00;
padding-bottom: 10000px;
    margin-bottom: -10000px;
}
</style>
<title>无标题文档</title>
</head>
<body>
<div id="main">
    <div id="left">
           固定252px<br/>1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>10<br/>
    </div>
    <div id="right">
        按浏览器自适应<br/>1<br/>2<br/>3<br/>4<br/>5<br/>
    </div>
    </div>
</body>
</html>



页面左右布局 宽度左边固定 右边自适应,左右高度自自适应
目前在firefox和ie8兼容 但不兼容ie6,ie7要怎么改

作者: joygarden   发布时间: 2010-12-27

楼主想实现啥样的效果啊 我帮你重新写一套吧

作者: houtianfu   发布时间: 2010-12-27