It seems like you are using relative values for your dimensions and positioning. You are going to have to change the div (I'm assuming) that has your image to a px value (because that's how images are measured) to constrain the border to the image.
Just wanted to say that your suggestion helped me fix the problem. I had put a min-height and min-width in my css. Once I changed it to a definite size the issue was resolved without affecting the rest of the page. Thanks again.