are margin and padding most disbalanced thing among all browser?

后端 未结 3 1188
清歌不尽
清歌不尽 2020-12-18 13:25

While some people use this reset. * { margin: 0; padding: 0; }

Is every element has default margin and padding in each browser default styleshee

3条回答
  •  孤城傲影
    2020-12-18 13:47

    Well, 'better than this' is hard to say, but the one with more stuff does more.

    outline 0 makes links not have the dotted border around them.

    Border 0 makes images and such not have a border around them.

    font-size: 100% probably does something like ensure the fonts are 100%.

    vertical-align: baseline sets all vertical alignments to the bottom of the container,

    background: transparent prevents some png problems.

    but margin:0 and padding:0 are two that defiantly should not be omitted from your reset list.

提交回复
热议问题