[英]Why is this logo in my header off-center, and how can I fix it?
這是我的網站: http : //mylifeiscode.com/studentprintz/
在Chrome中,徽標會加載居中,但在Firefox和IE中,它會向右移動。 我已經把CSS弄亂了一個小時,我無法理解為什么它在其他兩個瀏覽器中被推到了正確的位置。
有人知道CSS屬性在做什么嗎?
你絕對是定位,但不知道在哪里定位。 將邊距更改為位置。 所以,而不是:
a#logo, #logo-text { position: absolute; margin-top: 25px; margin-left: 5px; }
嘗試
a#logo, #logo-text { position: absolute; top: 25px; left: 5px; }
在第40行的template.css中,更改:
margin-left: 5px;
對此:
left: 5px;
正如旁注,如果您使用Firefox,我建議您下載Firebug,以防萬一這樣的情況發生。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.