Return to Snippet

Revision: 13355
at April 20, 2009 19:19 by kossmoss


Initial Code
CSS code:

img[align="left"]{ margin-right: 10px; margin-bottom: 10px; }

img[align="right"]{ margin-left: 10px; margin-bottom: 10px; }

Initial URL
http://www.idealweb.ru/layout/aligned-image-in-text-with-outer-css.html

Initial Description
When we can't or won't change the code of image tag with align attribute, but no 'style="margin: 0 10px 10px 0;' or 'hspace=10px' (IMHO, hspace makes bad looking layout in most cases) code within  (just pure <img> code), we can use simple CSS rules for such an images to make them good looking.

Initial Title
Cool CSS way to make left- or right-aligned (but not "styled" or "classed") images look pretty with no HTML change.

Initial Tags
text, images, layout

Initial Language
CSS