Get a div to go across the whole page

后端 未结 6 2110
刺人心
刺人心 2021-01-06 03:30

Whenever i try to make a div with width 100%, it does not go across the whole page, it leaves small margins on either side(top bottom left and right), i would like the div

6条回答
  •  梦毁少年i
    2021-01-06 04:04

    There is no need for padding as the padding is on the inside of the div and is measured as a distance from edge. Just set margin to 0px if you want a specific margin set then do it like @sho suggested and set them individually.

提交回复
热议问题