Different margin size for Firefox and Chrome

不想你离开。 提交于 2019-12-23 04:42:18

问题


The Firefox and Chrome margin-top size are different i attached the two browser images and my css code please give a feedback how to fix that issues.

Firefox ui:

Chrome ui:

CSS code:

.toparea-right .user-img > img {
    border-radius: 50%;
    display: inline-block;
    -webkit-transform: scale(0.90);
    -moz-transform: scale(0.90);
    transform: scale(0.90);
    vertical-align: inherit;
    float: right;
    margin-right: -395px;
    margin-top: -115px;
    width: 45px;
}

In chrome margin-top: -115px is working but in Firefox that going top but margin-top:-15px; it's working firefox.


回答1:


Use this snippet to reset browser defaults

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


来源:https://stackoverflow.com/questions/53993091/different-margin-size-for-firefox-and-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!