+ 2
Why does width:100%; not fill the whole screen?
Whenever I set an element's width to 100%, I always see some white lines at the left and right side of the screen. How can I make it fill it all? https://code.sololearn.com/Wh0osGP827M5/?ref=app
4 Antworten
+ 2
@ReimarPB Use this code for ur css :
position :absolute;
top: 0;
left: 0;
bottom :0;
right: 0;
height :100%;
width :100%;
background-color :blue;
+ 1
Bcoz u set the height to 50px, set it to 100% and it'll cover the screen, set height: 100%;
0
@Kenvin Vaz that's not what I meant by the whole screen... Try set both width and height to 100%. You will still see a white outline. Thats what I'm talking about.
0
set
*{
margin :0;
}
first of your css code