I am building a website for a friend, and part of his specification is that images should include links to view the image in a higher resolution. I enclosed the home image i
I solved this issue by setting the parent div of the element to text-align: center and the to display: inline.
.parent-div-of-your-a-tag {
text-align: center;
}
.your-img-class-name {
width: 100%; // might not be necessary, I needed them for responsive design
height: auto; // see above
display: inline; // necessary
}