模式一:

<style type="text/css">
div { height:300px; border:2px solid #306;}
.left{width:300px; position:absolute; left:0; top:0;}
.right{ margin-left:310px;}
body{margin:0; padding:0;}
</style>
</head>

<body>
    <div class="left"></div>
    <div class="right"></div>
</body>

 

模式二:

<style type="text/css">
div { height:300px; border:2px solid #306;}
.left{width:300px; position:absolute; left:0; top:0;}
.center{ margin-left:310px; margin-right:200px;}
.right { width:190px;position:absolute; right:0; top:0;}
body{margin:0; padding:0;}
</style>
</head>

<body>
    <div  class="center"></div>
    <div class="left"></div>
    <div class="right"></div>
</body>

 

相关文章: