I'm looking to create a header with a centered image and a background color that doesn't show through the image. Can anyone assist me with this?
Here is the HTML code:
<div id="header">
<a href="home.html"><img id="headerpic" src="images/logo.png"></a>
</div>
And here is the CSS code:
#header {
opacity: 0.5;
width: 100%;
height: 150px;
margin-bottom: 50px;
background-color: #000;
}
#headerpic {
height: 100%;
display: block;
margin-left: auto;
margin-right: auto;
background-color: none;
}
If you have any suggestions, please let me know. Thank you!