CSS: How can I get rid of the default window “padding”? An element set to 100% width doesn't reach the window's borders

前端 未结 4 630
孤城傲影
孤城傲影 2021-02-03 22:35

So I have an element that is placed directly inside body:


    
Some stuff...
Other stuff...
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-03 22:52

    Add these to the style tag in body, like the following one:

    body { margin:0px; padding:0px; }
    

    It worked for me. Good luck!!

提交回复
热议问题