Image changes the layout of a link when it gets visible
===

If I set the style of image to `display inline` by clicking a button by javascript then it becomes shown and a link `a` changes its layout a little bit.  

       <span>
         <a href="#">my link</a>
         <img  src="mygif.gif" style="display: none;">
       </span>


How do I get rid off that?  I need that setting the image visible doesn't change the layout of `a`.