Linking random images

With the help I got here, I was recently able to add random images to my front page. Now I would like to link them to pages in my website. I added: <a href=“link.htm”> in front of my random image’s php code and it did work, except now when the page is viewed in either Internet explorer or Firefox, I have this frame around it. In Safari that is not a problem. Is there a way I link the random image to another page without the frame?

It is the first image on this page that I am talking about: