【CSS】footer置底
好吧,其實我也沒有很認真地在學css。
只是突然想到某個功能,或是要去做,才會去做(無時無刻都是懶惰模式開啟)
阿網頁常常用到的footer置底對我來說還蠻有用的,實作出來是ok的
以下是我在網路上看到的網址所提供的,更詳細的可點網址進去看喔!!!!
引用出處的網址:http://goo.gl/MwtnFJ
這個網址也介紹許多css其他功能,如果沒有很排斥英文的話,會受益良多。
阿下面只是我的備份檔XDD我就是沒辦法一直逛英文網頁的英文白癡阿
The HTML
- <body>
- <divid="wrapper">
- <divid="header"></div>
- <divid="content"></div>
- <divid="footer"></div>
- </div>
- </body>
The CSS
- html,
- body {
- margin:0;
- padding:0;
- height:100%;
- }
- #wrapper {
- min-height:100%;
- position:relative;
- }
- #header {
- padding:10px;
- background:#5ee;
- }
- #content {
- padding:10px;
- padding-bottom:80px;/* Height of the footer element */
- }
- #footer {
- width:100%;
- height:80px;
- position:absolute;
- bottom:0;
- left:0;
- background:#ee5;
- }