For a while now I have been trying to figure out how to place an image behind a div that is centered at the top of the div. The image that would be placed behind the div will be an SVG image that in the future I am looking to animate. Currently right now the code I have supplied has a div that is 400 x 400 box and right now I have a place holder image that is right now floating to the left of the div. I am looking to see if anyone can help me out and solve my issue.
I have supplied an image of the intended result I am looking for!
Thanks in advance to everyone!
body {
background-color: #f6b93b;
height: 100%;
overflow: hidden;
}
#contentContainer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
#productCard {
height: 400px;
width: 400px;
background-color: #FFF;
border-radius: 25px;
}
<html>
<head>
<title>Snippet</title>
</head>
<body>
<div id="contentContainer">
<div id="imageContainer">
<img src="https://via.placeholder.com/100">
</div>
<div id="productCard">
</div>
</div>
</body>
</html>