Image link block takes up whole width of the page
问题 I have a main div as a container with a width of 90%. Inside at the top, I have a title (image) with height: 5em , display: block , and margin: auto . My HTML code is set up like so: <a href=""><img scr=""></a> . When I click way to the left of the picture, I am still able to click on the link. I am using Chrome for this . I tested this in Safari and Firefox ; same result. IE and Opera only registered the link when my mouse was directly over the picture (which is what I want). I'm hoping I