打印

[求助] 三列中间自适应大小的求助,特别感谢

目的:一行三列,left,center,right,左右两列固定。中间一列自适应窗口大小,中间一列文字自动居中。

 提示:您可以先修改部分代码再运行
此出出现的问题是,中间不能与屏幕大小自动适应,而且中间文字不能上下左右居中

回复 ehovey 在 1# 的帖子

下载个DW CS版本!
新建那里有你需要的模板了!!!!!
复制内容到剪贴板
代码:
<style>
#left{width:300px;height:300px;position:absolute;left:0px;top:10px;border:1px solid #000}
#right{width:300px;height:300px;
       position:absolute;
       right:0px;
       top:10px;
       border:1px solid #000}
#center{height:300px;
        border:1px solid #FF0000;
        margin-left:310px;
        margin-right:310px;}
#center p{text-align:center;}
</style>
<div id="left">这里是left里的内容</div>
<div id="center">
  <p>这里是center的内容,要求左右和上下均居中。</p>
  <p>与左右DIV相距10px</p>
</div>
<div id="right">这里是right里的内容</div>
这里我感觉可以用绝对定位,完全不用考虑浮动。。