網路城邦
上一篇 回創作列表 下一篇   字體:
CSS語法:兩欄式框架版面
2015/03/24 18:40:50瀏覽267|回應0|推薦0

<style type="text/css">

*{

        margin:0;

        padding:0;

}

.header,.contenter,.footer {    /*選取此三DIV的類別*/

        width:85%;

        margin:0 auto;

}

.header {

        background-color: #FF9;

        height:100px;

}

.content {

        background-color: #6FF;

        height:400px;

        left:0;

        margin-right:200px;

}

.side {

        background-color: #0F0;

        width:200px;

        position:absolute;

        top:0;

        right:0;

}

.contenter {

        background-color: #F9F;

        position:relative;

}

.footer {

        background-color: #FC3;

}

</style>

</head>

 

<body>

<div class="header"> header </div>

<div class="contenter">

  <div class="content">content </div>

  <div class="side">side </div>

</div>

<div class="footer"> footer </div>

</body>

( 知識學習隨堂筆記 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=dereklintw&aid=21738418