Why bother with all of that, a simple div in your header includes should be fine:
<div>
<img src="https://www.inliners.org/ubbthreads/images/forumimages/default/Forums_Logo_1355.jpg" style="max-width:100%;" alt="logo">
</div>
Any margin adjustments can be made inline in the div vs affecting the global styling which is used in every faucet of the script