首页 > Web开发 > 详细

css 剩余宽度完全填充

时间:2014-04-07 14:49:31      阅读:1266      评论:0      收藏:0      [点我收藏+]

从网上转的。

bubuko.com,布布扣
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>两列式全屏布局</title>

    <style type="text/css">
        html, body {
            margin: 0;
            padding: 0;
        }

        .top {
            background-color: red;
            border: solid 1px black;
            margin: 0 0 5px 0;
            height: 50px;
        }

        .sidebar {
            position: absolute;
            left: 0;
            top: 57px;
            width: 205px;
            background-color: yellow;
            border: solid 1px black;
            border-left-width: 0;
            height: 50px;
        }

        .main {
            margin-left: 210px;
            background-color: white;
            border: solid 1px black;
            height: 50px;
        }
    </style>

</head>

<body>
    <div class="top">A(固定高度,宽度自适应)</div>
    <div class="sidebar">B(高度任意,宽度为固定)</div>
    <div class="main">C(高度任意,宽度为除开B之外的所有空间,自适应)</div>
</body>
</html>
bubuko.com,布布扣

 

css 剩余宽度完全填充,布布扣,bubuko.com

css 剩余宽度完全填充

原文:http://www.cnblogs.com/newsea/p/3649807.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!