+ 1

How can I remove a HTML document's margins?

How can I remove the default margins that always seem to border a HTML document? Like when I start typing or adding an element, it is always a few pixels down and to the right from the very corner of the webpage. How can I change this? A universal fix would be good, instead of having to do it to each element separately. Thanks

9th Jul 2018, 12:16 PM
James
James - avatar
2 ответов
+ 3
body,html {margin:0;padding:0;} Just add the above line to your CSS.
9th Jul 2018, 12:22 PM
ihateonions
0
body, html { margin :0 ; padding : 0; }
22nd Aug 2018, 8:40 AM
ioana
ioana - avatar