Problem with absolute positioning in Firefox and Chrome

前端 未结 9 2208
傲寒
傲寒 2020-12-14 17:05

I don\'t understand why FF and Chrome render my page differently. Here\'s a screenie of it in

firefox: firefox example http://grab.by/65Bn

and here\'s one i

相关标签:
9条回答
  • 2020-12-14 17:54

    The real solution is firefox and ie don't set defaults for top, left, right, and bottom.

    I was able to fix my problem by setting these properly.

    0 讨论(0)
  • 2020-12-14 17:55

    I have used @media screen and (-webkit-min-device-pixel-ratio:0) {} and fixed my absolutes that way. Its not very dry but it works.

    0 讨论(0)
  • 2020-12-14 18:04

    It appears that the .remove-me element might have margin. Make sure to to remove that prior to adding absolute-positioning to items.

    For precise results, you should always do a 'reset' in your CSS. This means removing margin/padding from every element.

    A simple reset:

    * { margin: 0; padding: 0px; }
    

    Put that at the top of your CSS.

    0 讨论(0)
提交回复
热议问题