To position the images inside their container, you can use absolute positioning and follow these steps:
- Apply relative positioning to the
.certifikat
class so that any absolutely positioned children will be contained within it.
- Use absolute positioning for the
<img>
tags inside the .certifikat
class.
In summary, for the .certifikat
class, add the following CSS properties:
.certifikat{
position: relative;
overflow: hidden;
/*Add the rest of your CSS code here*/
}
If you know the width and height of the images, you can center them using the following CSS:
.certifikat img{
position: absolute;
top: 50%;
left: 50%;
margin-left: -(half of image width);
margin-top: -(half of image height);
}
OR if you're unsure of the exact dimensions, you can use the translate method as shown below:
.certifikat img{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
I hope this helps guide you in the right direction.