I'm trying to add a figcaption
to an image without moving the image from its original position due to the figcaption
. Below is the CSS code I'm using for the figcaption
.
Here is the code for an image with a figcaption
.
figcaption {
text-align: center;
display: inline-block;
}
<figure>
<a href="https://ibb.co/CbSzPRr">
<img src="https://i.ibb.co/CbSzPRr/Published-06-Retouced-Untagged.jpg" alt="Published-06-Retouced-Untagged" border="0">
</a>
<br>
<figcaption>
<div>Retouched, Untagged</div>
</figcaption>
</figure>
Additionally, here is a screenshot showing the current appearance. The image on the left is showing the desired position of the image, while the one on the right demonstrates the issue with the figcaption
being slightly up and to the left.
https://i.sstatic.net/DbrxO.png
I am relatively new to coding, so any suggestions or tips would be greatly appreciated. Thank you in advance! I believe there may be a straightforward solution that I'm overlooking.