Aligning Captions Flush Left
-
Sure… Armstrongtt is using Pressrow, which creates a light grey background with a grey border. Here’s a simple solution:
<table style="border:solid 1px #cdcdcd;background-color:#eeeeee;padding:2px;"> <tr><td>IMAGE_CODE_HERE<br />CAPTION_HERE</td></tr> </table>(Note that this is not an all-purpose solution: it’s for single full-size images, aligned to none.)
-
-
Elegant, but on second thought… With the above version the caption gets too close to the image. So back to normal:
<table style="border:solid 1px #cdcdcd;background-color:#eeeeee;width:WIDTH_OF_IMAGE_PLUS_FOURpx;padding:2px;"> <tr><td>IMAGE_CODE_HERE</td></tr> <tr><td>CAPTION_HERE</td></tr> </table>Made another improvement too. The previous version would be ok for images that cover the entire width of the theme, or for short captions, otherwise the caption text would spill past the image. So I added the width attribute to limit the caption text to the width of the image.
- The topic ‘Aligning Captions Flush Left’ is closed to new replies.