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

后端 未结 13 1322
春和景丽
春和景丽 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:17

    In my case the offset was added to a custom element with grid layout within an li while the ul was a vertical flexbox.

    The pretty simple solution was to set the define the li as block element with

    li {
     display: block;
    }
    

    And the offset was gone

提交回复
热议问题