I'm attempting to centrally position an image within a link:
<a href="URL">
<img class="my_class" src="SRC" />
</a>
The CSS code I have been using is as follows:
.my_class
{
position:relative;
display: block;
margin-left: auto;
margin-right: auto;
}
However, I am facing an issue where the link can be clicked across the entire width of the page at a specific height rather than just on the image itself. Additionally, my application needs to support both directions: dir:"rtl"
and dir:"ltr"