我在我正在制作的网站上有一些代码,应该很简单,但事实证明并非如此。
我希望我的页脚能够粘贴到页面的底部,但是要将所有内容放在第一位(当页面值超过页面时,如果这样做有意义的话)
我已经能够在Safari,Chrom和Firefox中做到这一点,但令人惊讶的是,Internet Explorer被证明是主要问题。
现在位于底部,但是当有很多时,页脚会出现在页面内容上(请参阅“我们是谁”选项卡。)
http://www.break-comms.com/index.html
我真的很感激任何对此的帮助,因为它真的开始惹恼我,现在已经回到了一个改变代码的堡垒好几个小时了。
以下是该页面附带的CSS,就像我说的那样,对此非常感谢。
* {
border:0px;
margin:0px;
padding:0px;
}
#html {
height:100%;
}
#banner {
padding: 5px 0px 10px 0px;
}
#container {
width:970px;
margin:0 auto;
height: 100%;
position: relative;
}
#wrapper {
position: relative;
min-height: 100%;
}
#nav {
margin-left:0px;
text-indent:0px;
text-align:center;
}
#menutab li {
display:inline;
list-style-type:none;
font-family:Arial;
font-size:18px;
font-weight:100;
text-align:center;
}
#menutab a {
color:#9ea3ab;
padding:5px 32px 5px 32px;
text-decoration:none;
text-align:center;
}
#menutab b {
color:#9ea3ab;
padding:5px 0px 5px 0px;
text-decoration:none;
text-align:center;
}
#menutab a:hover {
color:#28957f;
}
#social .socialImage{float:right;
}
.divFloat {
float:right;
padding:0px 5px 0pc 0px;
}
.clear {
clear:both;
}
#social {
background:transparent;
}
#footer {
Position:fixed;
bottom:0;
width:970px;
height:45px;
background-image:url(images/footer.gif); width:970px; height:45px;
}
#footermenu .footermenu{float:right;
}
#footermenu li {
display:inline;
font-family:Arial;
list-style-type:none;
font-size:16pt;
}
#footermenu a {
color:#9ea3ab;
font-family:Arial;
padding:0px 5px 0px 0px;
text-decoration:none;
text-align:right;
}
#footermenu a:hover {
color:#28957f;
}
.clearfooter {
height:45px;
clear:both;
}
#address {
color:#28957f;
font-family:Arial;
font-size:16px;
text-indent:5px;
}
#address2 {
color:#9ea3ab;
font-family:Arial;
font-size:14px;
text-indent:5px;
}
#contentbackground {
background-image:url("images/homebackgroundimage.gif"); width:970px; height:400px;
}
#contentbackgroundcontact {
background-image:url("images/contactbackgroundimage.gif"); width:970px; height:330px;
}
#contentbackgroundyouth {
background-image:url("images/youthbackgroundimage.gif"); width:970px; height:350px;
}
#contectbackgroundwhoweare {
background-image:url("images/whowearebackgroundimage.gif"); width:970px; height:700px;
}
#contentbackgroundmusic {
background-image:url("images/musicbackgroundimage.gif"); width:970px; height:360px;
}
#contentbackgroundbrand {
background-image:url("images/brandbackgroundimage.gif"); width:970px; height:500px;
}
#content {
color:#9ea3ab;
font-family:Arial;
font-size:14px;
padding:5px 30px 5px 50px;
text-decoration:none;
text-align:top;
}
#content2 {
color:#9ea3ab;
font-family:Arial;
font-size:14px;
padding:5px 30px 5px 70px;
text-decoration:none;
text-align:top;
}
#contentcontact {
color:#9ea3ab;
font-family:Arial;
font-size:16px;
padding:5px 30px 5px 50px;
text-decoration:none;
text-align:top;
}
h1 {
color:#9ea3ab;
font-family:Arial;
font-size:16px;
padding:5px 30px 5px 35px;
text-decoration:none;
text-align:top;
}
body {
height: 100%;
background-image:url("images/denimbackground.gif"); repeat;
}
答案 0 :(得分:2)
如果我删除#footer CSS指令中的position:absolute,则适用于我 包括在IE中。