There are several answers on StackOverflow, but the code structure of each is too different to directly understand.
My question is to know why the blue background does not take all the block? I still have white spaces.
CodePudding user response:
It is because you put it in two different elements. Instead what you can use is the sidebar button that you have put in that example.
That will fix it.
CodePudding user response:
The problem is that you are applying the color to a element that is inside the nav, not the whole nav. The element inside the nav is not taking up all the space. You can either change the color of the nav itself:
nav{
background: blue;
}
Or make the child fill up all the space in the nav:
.child{
height: 100%;
width: 100%;
}

