Div occupies the full width of the screen

0

I'm building a layout where there is a bar at the top of the screen that plays from side to side. I used the witdh:100%; property, but I did not get a satisfactory result. The body of the page is covering the entire screen, but both the top bar and the bottom bar are not really 100%, both leave a blank space, how can I resolve it?

    
asked by anonymous 09.09.2017 / 17:57

2 answers

1

use a css reset such as:

* {
    border: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

Or you can just set the margin of the bar to 0 and the padding of the body to 0.

    
09.09.2017 / 18:19
0

Probably only one clearfix is missing on your element.

    
12.09.2017 / 19:42