+ 1
How to remove the side spaces of background color on text
When using a background color for text or a div, how can i make it cover the whole horizontal line, without the right and left margin having white space
5 Réponses
+ 3
I would do it as its been suggested.
You could put
margin:0; into your body
and width:100vw; into your .list
+ 7
You may have to remove the margins from the body:
body {
margin: 0;
}
Or maybe you should try getting rid of some extra paddings on your element by using
. Class-name {
Padding: 0;
}
+ 4
It's not possible to answer perfectly without watching your code.
But try using
width :100vw;
margin:0
It depends on many other elements on page if something is oversized you'll keep getting white margins
+ paddidngs and borders also affect apperance so use them properly.
you better show code
+ 1
Thanks a lot guys, this was completely helpful
0
https://code.sololearn.com/WtM1nEXNzRrp/?ref=app
This is the stuff i'm working on, im five days into html and css, i tried making the margin 0 as you guys recommended, and the left space disappeared, but the right is still there. Please help guys.
Secondly, when i try adding a text after my edited lists, be it in form of paragraph, h1 etc it automatically turns into a link. Please im i getting it all wrong?
Thanks for the feed backs. You guys rock