左右两边高度自适应,右边宽度为浏览器宽度-200px。这个是怎么理解的呀?_html/css_WEB-ITnose

按照图片那样的排版,但是,但是,错了。求正确写法?先谢谢各位啦~~~
不理解右边的那个宽度是怎么写的?还有不知道错了,是不是右边的宽度计算错误了?

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">初试试题body {margin:0px 0px;padding:0px 0px;color:#fff; text-align:center;}#header {background:#0175ed;height:120px; line-height:120px;}#header, #footer, #container {    margin: 0px auto;    width: 100%;}#contentWrap {    margin-left: -200px;    float:right;    width: 100%;background:#86aef7}#content {    margin-left: 200px;}#side {    float:left;    width: 200px;background:#55a3f3;}#contentWrap,#side{min-height: 500px;height: auto !important;height: 500px;}#footer {    clear: both;background:#0175ed;height:50px; line-height:50px;}
高度120px
右边宽度100%-200px
左边宽度200px
底部高度50px

登录后复制

回复讨论(解决方案)

右边宽度100%-200px

左边宽度200px

–》

右边宽度100%-200px
     左边宽度200px

width:100%
position: abusote;
left : 0px;
用padding-left:200px; 来占位吧

右边宽度100%-200px

左边宽度200px

–》

右边宽度100%-200px
     左边宽度200px

所以,你这个回复是什么意思呢?

    左
    
            
    

高度 自适应 老的浏览器可能不行  所以要 写js计算把

    左
    
            
    

高度 自适应 老的浏览器可能不行  所以要 写js计算把 右边=浏览器宽度-200px,这个怎么理解的呀?

这样做可以实现以上所说布局

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">初试试题body {margin:0px 0px;padding:0px 0px;color:#fff; text-align:center;}#header {background:#0175ed;height:120px; line-height:120px;}#header, #footer, #container {    margin: 0px auto;    width: 100%;}#right,#side{min-height: 500px;height: auto !important;height: 500px;}#side {    float:left;    width: 200px;background:#55a3f3;}#right {  background:#86aef7}#footer {    clear: both;background:#0175ed;height:50px; line-height:50px;}
    
高度120px
    
        
左边宽度200px
右边宽度100%-200px
    
    
底部高度50px

登录后复制登录后复制

这样做可以实现以上所说布局

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">初试试题body {margin:0px 0px;padding:0px 0px;color:#fff; text-align:center;}#header {background:#0175ed;height:120px; line-height:120px;}#header, #footer, #container {    margin: 0px auto;    width: 100%;}#right,#side{min-height: 500px;height: auto !important;height: 500px;}#side {    float:left;    width: 200px;background:#55a3f3;}#right {  background:#86aef7}#footer {    clear: both;background:#0175ed;height:50px; line-height:50px;}
    
高度120px
    
        
左边宽度200px
右边宽度100%-200px
    
    
底部高度50px

登录后复制登录后复制 是可以实现,但是,我想知道右边的宽度计算。你这个写法不对吧~~~

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2843590.html

(0)
上一篇 2025年3月10日 06:05:37
下一篇 2025年3月10日 06:05:48

AD推荐 黄金广告位招租... 更多推荐

相关推荐

发表回复

登录后才能评论