/ Published in: CSS
How to align floating images in wordpress posts and add captions.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
img.alignleft, div.alignleft { float:left; margin:0 0.5em 0.5em 0; } img.alignright, div.alignright { float:right; margin:0 0 0.5em 0.5em; } img.aligncentered, div.aligncentered { display: block; text-align:center; margin:0 auto; } .wp-caption { border: 1px solid #ddd; text-align: center; background-color: #f3f3f3; padding-top: 4px; margin: 10px; -moz-border-radius: 3px; -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } .wp-caption img { margin: 0; padding: 0; border: 0 none;