テンプレートの作り方を練習しました。私の最初の問題は、コンテンツが画面全体を埋めるのに十分な長さでない場合に、画面の下部にフッターを貼り付ける方法です。このチュートリアルhttp://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-pageを使用して解決しました
もう 1 つの問題は、サイドバーをフッターまで埋める方法でした。
ここにhtmlがあります:
<div id="wrapper">
<div id="header">
header here
</div>
<div id="container">
<div id="sidebar">
sidebar here
</div>
<div id="content">
content here
</div>
</div>
<div class="cls"></div>
<div id="footer">
footer here
</div>
</div>
ここにCSSがあります:
body{
padding: 0;
margin: 0;
}
.cls{
clear:both;
}
#wrapper{
min-height: 100%;
position: relative;
}
#header{
background-color: #DDDDDD;
height: 60px;
}
#container{
padding-bottom: 60px;
width: 100%;
}
#sidebar{
background-color: #87CEFA;
width: 220px;
float: left;
padding-right: 20px;
}
#content{
width: 75%;
float:right;
}
#footer{
background-color: #CCCCCC;
bottom: 0;
position: absolute;
width: 100%;
height: 60px;
}
画像リンクを開くと、左側にあるのが今持っているものです....結果を右側にあるものにしたい http://www.4shared.com/photo/CoXrUWP2/template.html