Avoiding unwanted space below images in Hotmail

One of the really annoying unwanted assumed attributes that Hotmail applies to elements is space below images. This short little tutorial shows how to remove that unwanted space. Update – ¬†Google Mail also suffers from the same layout bug. Happily, ¬†the technique described below also works for Google Mail.

All that’s required is an inline style with two properties – ‘display’ and ‘float’:

<img style="display: inline; float: right;" src="foo.gif" alt="-" width="32" height="32" />

‘Display’ must be set to ‘inline’, whilst ‘float’ can be either ‘left’ or ‘right’. That’s it. No more unwanted space below images in Hotmail.

Tags: