Please refer to the code below:- https://jsfiddle.net/Omega_Coding/xo1dtg52/1/
Cant able to understand why is there spacing above and below the header div. Want the complete header to be of steelblue color.
If you go to the fiddle, you will be able to see that there us header div is not able to stretch to the whole intended header. Need it to cover the full height above nav bar, so that its all steelblue and no black color.
<body>
<div id="header">
<p>THE GREAT</p>
<p>RGB (<span id="r">0</span>, <span id="g">0</span>, <span id="b">0</span>)</p>
<p>GUESSING GAME</p>
</div>
<nav class="nav">
<button id="new">RESET</button>
</nav>
<div id = "box">
<div class="boxes"></div>
<div class="boxes"></div>
<div class="boxes"></div>
<div class="boxes"></div>
<div class="boxes"></div>
<div class="boxes"></div>
</div>
body{
font-size: 25px;
text-align: center;
background: #232323;
color: white;
}
#header{
background: steelblue;
}
button {
border: none;
background: none;
text-transform: uppercase;
height: 100%;
font-weight: 500;
color: steelblue;
font-size: inherit;
transition: all 0.3s;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
outline: none;
}
nav{
height: 30px;
width: 100%;
background-color: white;
color: black;
}
.boxes {
width: 30%;
padding-bottom: 30%;
float: left;
margin: 1.66%;
border-radius: 15%;
transition: background 0.6s;
-webkit-transition: background 0.6s;
-moz-transition: background 0.6s;
}
#box {
margin: 20px auto;
max-width: 600px;
}