I am attempting to center a logo on top of a moving image that scrolls through (unfortunately, the movement isn't visible on jsfiddle). I have tried using <center>
tags, but they do not work. Adding margin: auto;
does not properly center the image either, and I am puzzled by this.
#hb_title {
background: url('https://cdn.shopify.com/s/files/1/0580/2885/products/the-prison-server-logo_4d5b6eb2-d630-43d9-b8c0-bd024646ef12_400x400.jpg?v=1510041886');
background-repeat: no-repeat;
width: 50%;
margin: auto;
height: 60%;
}
#header_block {
background: transparent url('http://i.imgur.com/1tyMljX.jpg') repeat fixed 0% 0%;
width: 100%;
height: 139px;
width: 100% border-bottom: 2px solid #2ECC71;
text-shadow: 0px 1px 0px rgb(39, 33, 59);
animation: bganim 20s linear infinite;
}
<div id="header_block">
<div id="hb_title">
</div>
</div>
The image in the URL has adjustable pixel dimensions, and I acknowledge that it is basic. This exercise serves as practice for me.
My experimentation with the code is being conducted on JSFiddle.