WORDPRESS ALIGN

Send Snippet To: Save this snippet to Code Collector Pro -- view all maeghan's snippets
language: PHP
license: BSD

Code for Snippet:

                
//How to align floating images in wordpress posts and add captions.
 
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;
comments powered by Disqus

Info

Tags: wordpress

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 771
Date Added: 2009-04-28 01:13:59
Last Modified: 0000-00-00 00:00:00

Web Analytics