Small padding, big difference

后端 未结 7 1745
夕颜
夕颜 2021-01-05 06:26

If I only add a 1px padding to a div around a heading, then this makes apparently a huge difference (http://jsfiddle.net/68LgP/).

html:

7条回答
  •  庸人自扰
    2021-01-05 07:20

    You could use CSS Reset which resets all CSS settings, including this kind of problems. Recommended for any site.
    How can CSS Reset file solve your problem? As you can see, in the first paragraph, h1 is included, and it's given margin:0 which is needed for reducing the difference in problems like yours.

提交回复
热议问题