body {
margin:0;
}
.container {
width:900px;
margin:0 auto;
}
.header {
background:linear-gradient(90deg, lightblue, lightgreen);
width:100%;
height:50px;
position:fixed;
}
ul {
margin:0;
padding:0;
}
.hright li {
list-style:none;
display:inline-block;
width:100px;
height:50px;
line-height:50px;
float:right;
color:white;
}
.hleft h3 {
width:100px;
height:50px;
float:left;
color:white;
margin-top:10px;
}
この状態でCSSでheaderをposition:fixedにするとtopクラスのh2タグの「TEST」の文字が表示されなくなって、headerの上に少し余白が出来てしまう。
このような状態にならないようにするにはどうしたら良いのでしょうか?