我一直在尝试修复我的网站在不同浏览器上的外观,我终于在IE
和Google Chrome
上实现了这一点,但在Mozilla Firefox
上却毁了它,它一直出现在浏览器的左上角,因为我将每个maindiv
设置为绝对值,即使我为每个main<div>
都提供了所需的图像高度,并且在每个设置了100%的宽度
这是代码的副本:
#headerofhome {
background-image: url(images/home/homepage_header.jpg);
background-repeat: no-repeat;
height: 95px;
width: 100%;
position: absolute;
top: 0;
left: 0;
}
#container {
background-color: #FFFFFF;
height: 497px;
width: 100%;
background-image: url(images/home/homepage_container.jpg);
background-repeat: no-repeat;
position: absolute;
left: 0;
top: 95px;
margin: 0px;
padding: 0px;
background-attachment: scroll;
}
.footer {
background-image: url(images/home/homepage_footer.jpg);
background-repeat: no-repeat;
height: 72px;
width: 100%;
position: absolute;
left: 0px;
top: 592px;
}
最佳答案
将right
和bottom
与left
和top
一起使用,您将实现所需的功能=)
关于html - 我的网站仅在FF上位于浏览器的左上 Angular ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16843604/