Top > 2007年01月
2007年01月22日
背景画像が表示されないのは、解除不足
IE以外(firefox.opera.netscapeなど)で、背景画像が表示されないときがあります。
floatが解除されていないと、背景画像が表示されません。
floatした要素のすぐ下に、<br clear=all>をいれるなどして、floatを解除しましょう。2007年01月12日
フッターをページの一番下にいつも置く
ページの内容が短いと、フッターがページ中央などにきたりしてすごく見栄えが悪い…
ページの内容が短くてもフッターがページの一番下に表示される方法です。
<html>
<body>
<div id="contents">
<div id="main">本文</div>
<div id="footer">フッター</div>
</div>
</body>
</html>
<body>
<div id="contents">
<div id="main">本文</div>
<div id="footer">フッター</div>
</div>
</body>
</html>
html{
height:100%;
}
body{
height:100%;
}
#contents {
position: relative;
min-height:100%;
_height:100%;
}
★フッターの高さを50pxにしたい場合
#footer {
position; absolute;
bottom:0px;
height: 50px;
}
#main {
padding-bottom: 50px;
}
height:100%;
}
body{
height:100%;
}
#contents {
position: relative;
min-height:100%;
_height:100%;
}
★フッターの高さを50pxにしたい場合
#footer {
position; absolute;
bottom:0px;
height: 50px;
}
#main {
padding-bottom: 50px;
}