Wrap images that are wider than half of the screen into a centered &lt;span&gt; This makes a floating (align=right or align=left attribute) image to fill full horizontal size if it's wider than 50{bbackup_94402fb9ba80f392e0976ece85f92b2b876bfcaed8d83250cc06083f7139c7d9} of the screen width (otherwise there is a narrow column of text near the image).