HTML:
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="header">
<span>New Colors</span>
<span>Easy</span>
<span class="selected">Hard</span>
</div>
</body>
</html>
CSS:
body{
background: #232323;
}
#header{
background: white;
height: 30px;
}
div#header span{
height: 100%;
}
.selected{
background: steelblue;
}
Why span height is not equal to div height? div height is 30px, but span height is 17px. My span height is only content height. How can I change span height equal to div height?