两个并列的div,一个确定宽度一个自动调整

<html>
<head>
<style type="text/css">
<!--
*{ margin:0; padding:0}
html{ overflow-x:hidden}
#wrap{float:left; width:auto; margin:0 300px 0 0; background:#999999   }
#contentwrap {
    width: 100%;
    float: left;
    background:#fff
}
#content{ width:100%}
#sidebar {
    position:relative;
    width: 300px;
    float: right;
       margin-right:-300px;
       background:#0551CD
}
-->
</style>
</head>
<body>
<div id="wrap">
   <div id="contentwrap">
       <div id="content">the working together of two things (muscles or drugs for example) to produce an effect greater than the sum of their individual effects.
两个事物(如肌肉或药物)的共同作用,产生的效果大于单个事物作用效果的总和。
        </div>
   </div>
   <div id="sidebar">如下图选择 工具 帐号 打开 如下图 2. 然后在打开的页面中点击添加 邮件,如下图: 3. 然后...然后再点服务器标签,如下图,在5的位置打上对号,然后点6处的设置,选择7处的对应选项。点确定并关闭所有属性窗口。... hhhhy
   </div>
</div>
</body>
</html> 

posted @ 2013-01-29 19:33  金虹巴巴  阅读(656)  评论(0编辑  收藏  举报