I've tried both these posts with no success :
How do I position one image on top of another in HTML? HTML Position image on top of another
My goal is to create a 'product card'. It will have a background image and a product image that should fit to 100% of it's width and 60% of it's height (from top). Something that looks like that - http://up419.siz.co.il/up2/gtarmjyjj55z.jpg
That's my HTML(JSX) :
<div className="product-card">
<img className="card-background" src={cardBg} />
<img className="product-image" src={image} />
</div>
That's my CSS :
.card-background{
position: relative;
top: 0;
left: 0;
}
.product-image {
position: absolute;
top: 0;
left: 0;
}
And the weird result - http://up419.siz.co.il/up2/ytmyo2ugwu15.jpg