I have tried to do the following, as well as using the align only with the <a> href and <img> tags, yet I still cannot align the clickable image to the center of the page.
<a href="next.html" align="middle">
<img src="tlbr.png" align="middle">
</a>
The float tag also does not work in any way I have tried, since, as far as I am aware, there is no way to float to center.
Any solution, directly in HTML or in the CSS, would be great. Thanks.
Check out the demo and try like this: Demo
a img {
margin:0 auto;
display:block;
}
Add this code to your CSS:
a img{
display: block;
text-align: center;
}
JSFIDDLE DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With