I have an image:
img {
width: 250px;
height: 250px;
border: "1px solid black";
}
<img src='/image.jpg' alt='An image'>
Now what I want to do is align a div in such a way such that it’s in the top right corner of my img. Like this:

How do I do this?
>Solution :
Let me give an example:
To align a div to the top right corner of an img element, you can use CSS positioning.
.container {
position: relative;
}
.content {
position: absolute;
top: 0;
right: 0;
}
<div class="container">
<img src="path/to/image.jpg">
<div class="content">Content to be aligned</div>
</div>
Hope this will help you