I'm trying to keep an image in place, relative to the width and height of the screen, without distorting the image. I'm new to HTML and CSS and looking around online, which I've done, I cant seem to come up with a solution that helps me.
This is what the website looks like currently
.background .top img {
width: 350px;
height: auto;
display: block;
margin: 7% 40vw 0 40vw;
position: fixed;
}
<link href="https://fonts.googleapis.com/css?family=Nixie+One" rel="stylesheet">
<div class="background">
<div class="top">
<img src="https://i.gyazo.com/6b4879127e032e75fbd44521893576e3.png" alt="Panda">
</div>
<div class="bottom">
<p>Hi, Im <span>James</span>.</p>
</div>
</div>
I want it to stay hanging over the black part like it is already, no matter the change in height or width of the screen