0
討厭帶來另一個粘性頁腳問題,但在兩天的時間內尋找答案後,我放棄了。如果屏幕高度太小,粘滯頁腳不起作用
這裏的問題我的頁面:http://aaronisdead.com/sites/kanwakan/kanwakan.html
這裏是我的HTML結構
<html>
<head>
</head>
<body>
<header>
<div class="headercenter"><img src="kanwakanheader.png"></div>
</header>
<div class="mainwrap">
<div class="left">
<img src="featonspin.png">
<iframe src="https://player.vimeo.com/video/78659516" width="464" height="257" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
<div class="right">
<img src="featoncarson.png">
<iframe src="https://player.vimeo.com/video/86751056" width="464" height="257" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
<div class="bandpic">
<img src="bandpic.jpg">
</div>
<div class="text">
</div>
</div>
<div class="wrapper">
<div class="push"></div>
</div>
<div class="footer">
<div id="footwrap">
<div id="leftcol">
<img id="email" src="bottomcontact.png">
</div>
<div id="rightcol">
<img id="andlogo" src="bottomlogos.png">
</div>
</div>
</div>
Annnd這裏是我的CSS。
.mainwrap {
margin-right:auto;
margin-left:auto;
display:block;
width:950px;
top:75px;
height:100%;
}
.right {
position:relative;
width:50%;
margin-right:auto;
margin-left:auto;
display:block;
float:right;
padding:0 0 30 0;
}
.left {
position:relative;
padding-bottom:0px;
width:50%;
margin-right:auto;
margin-left:auto;
display:block;
float:right;
left:10px;
}
/*HEADER*/
.headercenter {
width:375px;
margin-right:auto;
margin-left:auto;
display:block;
}
header {
position:relative;
width:100%;
height:75px;
background:#000000;
}
/*FOOTER STUFF*/
#email, #andlogo {
height:75px;
}
#footwrap {
width:950px;
height:75px;
margin-right:auto;
margin-left:auto;
display:block;
}
#leftcol {
float:left;
width:50%;
}
#rightcol {
float:right;
width:50%;
}
/*ABSOLUTELY NECESSARY PAGE PROPERTIES*/
body {
background-image:url("background.jpg");
background-attachment: fixed;
background-height:100%;
background-repeat:repeat;
background-position:center;
}
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -75px;
}
.footer {
width:100%:
position:absolute;
background:#000000;
z-index:999;
}
.footer, .push {
height: 75px;
}
我不確定是什麼原因造成的;因爲這個,我收錄了很多信息。如果你花時間完成所有這些工作,你將以非常大的方式幫助我理解粘性頁腳,這項技能我將永遠可以用作Web開發人員。謝謝。