CSS Top-Margin Issue

前端 未结 2 1520
小鲜肉
小鲜肉 2021-01-16 15:24

Does anyone know why I don\'t get a top-margin in the first div based on the CSS below? This renders the same in Chrome, Safari and Firefox 4 running on Mac OSX Lion (render

2条回答
  •  难免孤独
    2021-01-16 15:50

    Its because there is a default margin and padding on html tags. Use a reset like this one to remove all of the browser defaults. (I highly recommend doing this)

提交回复
热议问题