How do I get rid of an element's offset using CSS?

后端 未结 13 1262
春和景丽
春和景丽 2020-12-04 08:43

I\'ve got a positioning problem with some elements, upon inspecting it IE8 Developer tools it shows me this:

\"W

13条回答
  •  独厮守ぢ
    2020-12-04 09:33

    I had the same issue on our .NET based website, running on DotNetNuke (DNN) and what solved it for me was basically a simple margin reset of the form tag. .NET based websites are often wrapped in a form and without resetting the margin you can see the strange offset appearing sometimes, mostly when there are some scripts included.

    So if you are trying to fix this issue on your site, try enter this into your CSS file:

    form {
      margin: 0;
    }
    

提交回复
热议问题