布丁足迹

千里始足下,高山起微尘,吾道亦如此,行之贵日新。

DIV自适应宽度够精点

CSS+DIV布局中的自适应宽度
2006-09-26 17:01

需要个左150,右自适应宽度DIV,找了个挺好。收了。下面是代码.

_____________________________________________________________

<!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=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body{margin:0;padding:0px;text-align:center;}
#wrap{margin:0 auto;text-align:left; width:900px;}

/*左边栏,固定宽度*/
.wrap_l{float:left;background:#FF0000;margin-right:-150px;width:150px;}
/*中间栏,自适应宽度*/
.wrap_m{width:auto;background:#00FF00;margin:0 140px 0 150px;}
/*右边栏,固定宽度*/
.wrap_r{float:right;background:#0000FF;margin-left:-140px;width:140px;}

.wrap_inner_l{float:left;background:#00FFFF;margin-right:-200px;width:200px;}
.wrap_inner_m{width:auto;background:#FFFF00;margin:0 0 0 200px;}

-->
</style>
</head>
<body>
<div id="wrap">
<div class="wrap_l">左边栏</div>
<div class="wrap_r">右边栏</div>
<div class="wrap_m">中间栏</div>
</div>
</body>
</html>
 

 

 

« 关于最近卡巴升级不了级解决方案!功夫之王要上映了,看看花絮! »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

宣传推广栏

最新评论及回复

最近发表

Powered By Z-Blog 1.8 Spirit Build 80722

Copyright © 2006-2009 www.ddhbb.com.cn All rights reserved.辽ICP备08100443号