私は現在、@ http://development.aycdesign.net/skinで Joomla 2.5 テンプレートに取り組んでおり、これで何日も立ち往生しており、Google はこの問題について友人ではありません。私が達成しようとしているのは、可変サイズのヘッダーと可変サイズのフッターを持ち、コンテンツ コンテナーを常にブラウザー ウィンドウ サイズの最小 100% にすることです。太陽の下でほぼすべてを試しましたが、2つの問題が発生しました。
- コンテンツが入っているコンテナが、そのコンテナの 100% の高さまで拡張されません。
- スクロールする必要があるページでは、コンテンツの一部がフッターにクリッピングされています。
これに関する提案は大歓迎です。これを解決して先に進むことができます!
<html>
<body>
<div id="wrapper">
<div id="top">
header
</div>
<div id="mnav">
main menu
</div>
<div id="pagewidth">
<div id="maincol">
content
</div>
</div>
<div id="footer">
footer
</div>
</div>
</body>
</html>
....そしてcss:
html,body {
height:100%;
background: rgb(138, 126, 102);
color: #A5A56F;
font-family: arial, sans-serif;
font-size: .9em;
line-height: 1.25;
}
/* ******************************************************************** */
/* Wireframe Elements */
/* ******************************************************************** */
#wrapper {
position: relative;
height:auto !important;
height:100%;
min-height:100%;
}
#top {
background: rgb(0, 0, 0);
width: 100%;
}
#top .custom {
width: 80%;
margin: 0 auto 0 auto;
color: #fff;
text-align: right;
padding: .5em 0 .5em;
}
#pagewidth {
width: 80%;
min-height: 100%;
background: rgba(54, 54, 54, 0.5);
text-align: left;
margin: 0 auto;
padding-bottom: 3em;
}
#maincol {
}
#footer {
background: rgb(0, 0, 0);
width: 100%;
height: 5%;
position: absolute;
bottom: 0;
}
#footer .custom {
width: 80%;
margin: 0 auto;
color: #fff;
text-align: right;
padding: .5em 0 .5em 0;
}