I have an image where I need to add a tag to the right bottom corner.
When I pust it there, it's 4px below the image, no padding nor margin is there.
.postImage { position: relative; display: inline-block; } .post img.thumbnail { width:100%; height: 100%; } .commercial { position: absolute; bottom: 0; right: 0; background-color: #666; color: #fff; padding: 3px; font-size: 14px; font-weight: 100; } <div class="postImage"> <img class="thumbnail" src="https://dummyimage.com/600x400/f00/fff"> <span class="commercial">commercial</span> </div> What is the best way to fix it? I don't think
bottom: 4px; is the right one.
Thank you
<figure>for the wrapper and<figcaption>for the caption as they are used for exactly this purpose.