I'm currently working on my first website that I am proud of, and I am in the process of creating a background using CSS and an image. I want it to look exactly like the picture.
.
I have successfully achieved this (accomplished already), but the issue is that it is not responsive, most likely due to the position: absolute property. My goal is to make it properly responsive.
Below is the HTML code that I am using for the background:
.bg {
background: #9359C7;
color: white;
display: grid;
text-align: center;
height: 764px;
width: 1280px;
}
.content {
position: relative;
}
.content img {
width: auto;
height: auto;
position: absolute;
right: -178px;
bottom: 0;
}
<div class="bg">
<div class="content">
<h1>Lol</h1>
<img src="https://www.pikpng.com/pngl/m/69-698658_yami-ygi-y-gi-yu-gi-oh.png" alt="Yugi">
</div>
</div>
- EDIT: I have uploaded my entire site on Pastebin because I couldn't upload it directly here. The snippet provided did not work for me.