Why is chrome highlighting a margin that is not listed in styles or computed

一个人想着一个人 提交于 2019-12-05 04:10:56

This is caused by the display: block rule.

The element is occupying entire horizontal space of it's parent, so chrome tries to convey that by coloring the occupied space with the margin color.

Change the rule to either display: inline-block or display: inline to remedy the issue.

My guess here would be that the containing small-4 possibly has a padding? Or Chrome is trying to be smart.

Totally get what you are talking about. What you are asking for is: Where can I see the rules for example “body { margin: 10px; }” that is somehow the default in Chrome. I only know this because when I set the margin to 0, I can see a substantial jump in my text’s indentation. Also as you mentioned in the Chrome there is a highlight that should not theoretically be there. Hence some default “padding” or “margin” being added. Not sure what level you on but you might want to look at the reset of these values to answer your question: https://css-tricks.com/reboot-resets-reasoning/

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