好的,所以我用一個外部CSS做了一個簡單的網頁,現在在我的電腦上看起來很好,但是當我將它發送給我的朋友時,底部的按鈕並不在一起?CSS圖像在不同分辨率下的不同位置?
我的顯示器 http://i.imgur.com/ektmF.png
朋友監控 http://i.imgur.com/RmB3t.png
HTML代碼
<body>
<style type="text/css">
body {
overflow:hidden; <!-- Setting body overflow to hidden -->
}
<!-- Background image -->
</style>
<div id="backgroundWrapper">
<img src="background.png" />
</div>
<!-- Home button -->
<div id="homebtn">
<a href="..\home.html" onmouseover="SwapOut()" onmouseout="SwapBack()"><img name="homebtn" src="homebuttonup.png"/>
</a>
</div>
<!-- Shop Button -->
<div id="shopbtn">
<a href="shop.html" onmouseover="SwapOutshop()" onmouseout="SwapBackshop()"><img name="shopbtn" src="shopbuttonup.png"/>
</a>
</div>
</body>
CSS代碼
#backgroundWrapper{width:100%;height:100%;z-index:-1;position:absolute;}
#backgroundWrapper img{width:100%;height:100%;z-index:-1; position:absolute;}
#homebtn {width:100%;height:100%;z-index:1; position:absolute;top:90%; left:35.3%;}
#shopbtn {width:100%;height:100%;z-index:1;position:absolute; top:90%; left:50%;}
#text {
color:black;
font-size:15;
text-align:center;
position:relative;
top:20%;
font-family:verdana;
font-weight:bold;
}
#myform {
position:absolute;
left:10%;
top:30%;
}
#submitbuttons {
position:relative;
text-align:center;
top:80%;
}
body {
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px
}
這看起來不錯? –
@RyanConway你是什麼意思這種看法是正確的?這顯然是正確的 –
HTML - http://i.imgur.com/RQIps.png CSS - http://i.imgur.com/UrkIL.png –