CSS Margin: 0 is not setting to 0

前端 未结 11 1605
名媛妹妹
名媛妹妹 2020-12-06 09:13

I\'m a new comer to web designing. I created my web page layout using CSS and HTML as below. The problem is even though i set the margin to 0, the upper margin is not settin

11条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 09:48

    h1 {
    margin-top:0;
    padding-top: 0;}
    

    It' s just a misunderstanding with h1 tag. You have to set h1 tag margin-top and padding-top to 0 (zero).

提交回复
热议问题