我只开发了我的观看 firefox。完成后我在 chrome 中打开我的网站..然后我看到对齐问题...
代码如下
<span class="fbtopbutton">
<div id="left">
<a href="#"><img src="/images/fb-login.png"></a>
</div></span>
我在 html 代码的不正确位置使用此代码..(因为某些 php 代码限制..)这就是为什么使用 margin-left top 和 right
CSS 代码 .fbtopbutton{ position: absolute;margin-top: 5px;margin-left: 27px;}
在火狐浏览器中 在 Chrome View 中
最佳答案
尝试:
.fbtopbutton{ position: absolute;top: 5px;right:(however far from the right you need it to be)}
确保父级也绝对定位或相对定位。
关于css - 左右边距在 Firefox 和 Chrome 中对齐不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13074517/