The Social Newsroom

Slideshows for Tag: socialmedia

Monday, November 14, 2011

How to Align Images in CSS & HTML

How to Align Images in CSS & HTML: "(1) the image and (2) the caption below it. The trick is to set the "floating" paragraph width to the same width as the image. That forces the text (i.e. the caption) inside the "floaty" paragraph to wrap when it exceeds the image width.

Here's the CSS code for aligned image + caption:

Temple of Hephaistos
© 2005 Ellen Brundige


'via Blog this'

No comments:

Post a Comment