<!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>无标题文档</title>

<style type=”text/css”>

* {

margin:0;

padding:0;

}

.left {

width:240px;

background:#fff;

position:absolute;

left:5px;

top:5px;

right::5px;

overflow:auto;

border:1px #f00 solid;

bottom:5px;

}

.right {

margin-left:260px;

margin-top:0px;

background:#fff;

height:100%;

border:1px solid #00ff00;

position:relative;

border:1px #f00 solid;

}

</style>

</head>

<body >

<div style=”width:700px;height:200px; position:relative;border:1px #f00 solid;”>

<div class=”left”>

<div style=”width:500px;height:500px;”></div>

</div>

<div class=”right”>

<div>111</div>

<div style=”position: absolute; top: 20px; right: 0px; bottom: 0px; left: 0px;overflow-y:auto;”>

<div style=”width:500px;height:500px;border:1px #f00 solid;”></div>

</div>

</div>

</div>

</body>

</html>

No Responses to “兼容IE的div高宽100%,带边框与margin”

Leave a Reply

请输入算式结果(看不清请点击图片)
(必须)