Home > Software design >  To cover the page side to side with a div?
To cover the page side to side with a div?

Time:02-14

enter image description here

How do i fill those borders at the side of those div elements? I want the background-color property of the div to cover the area it is on completely side to side

this is my css for both of those div:

.res {
    background-color: coral;
    width: 100%;
    overflow: hidden;
    object-fit: fill;
    margin: 0px;
    border: 0px;
    padding: 0px;
}

as you see, i've tried everything i found, but none of those worked

CodePudding user response:

Add

body {
    margin: 0;
}

to your CSS file. It should fix it.

  • Related