2012-10-25 67 views
0

左,右對齊不同,我開發了我看的Firefox only.after完成我在chrome..then我看到對齊問題打開我的網站......保證金在Firefox和Chrome

下面的代碼

<span class="fbtopbutton"> <div id="left"> <a href="#"><img src="/images/fb-login.png"></a> </div></span>

使用我這個代碼在HTML代碼中的不正確的位置..

(因爲一些PHP代碼限制。)這就是爲什麼使用保證金左頂部和右

CSS代碼 .fbtopbutton {位置:絕對;邊距:5px的;保證金左:27px;}

在Firefox視圖 firefox view 在鉻視圖 enter image description here

回答

0

嘗試:

.fbtopbutton{ position: absolute;top: 5px;right:(however far from the right you need it to be)} 

確保母體也絕對或相對定位。

+0

這個代碼不對齊proper..but這個代碼還實現了browsers..thats很多相同的效果:) – user1753971

+0

@ user1753971我已經編輯我的答案。您需要設置正確的屬性你想要的跨度和家長的右邊緣之間的距離。 –

+0

yep..thanx很多兄弟.. – user1753971