+ 1
How can an element take the full width of the screen
Whenever I make a element take 100% of the width, eg width:100% There is always some space between the edge of the screen. It looks like it's only taking 95%. How do I fix this? Is it my browser?
6 ответов
+ 2
Put margin 0 in body tag
+ 1
Thank you all. That simple thing is what's been hurting my brain for a while😂
+ 1
Consider adding
*{
margin: 0;
padding: 0;
box-sizing: 0;
}
in all your CSS files.
0
Thank you
0
I've never seen the property "box-sizing"