I am trying to make an html page with a fixed header at the top, containing an icon and some buttons.
But the buttons appear in the wrong place, as if they were outside the containing header.
Any idea why this is, and what I can do about it?
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
header {
margin: 0px -8px -8px -8px;
position: fixed;
width: 100%;
background-color: #395FAA;
color: white;
}
#heading {
height: 66px;
line-height: 66px;
vertical-align: middle;
}
#heading button {
height: 50px;
width: 100px;
color: white;
background-color: #2A477F;
font-weight: bold;
text-transform: uppercase;
border: none;
}
#content {
height: 2000px;
}
</style>
</head>
<body>
<header>
<div id="heading">
<img src="https://icons.iconarchive.com/icons/ampeross/qetto/64/icon-developer-icon.png">
<button href="/home/default.html">Services</button>
<button href="/xrgroups/default.html">Groups</button>
Some text here
</div>
</header>
<div id="content">
</div>
</body>
</html>