groups

info


tags: wordpress

Link to this snippet:


Download to Code Collector

language: PHP
licence: BSD

WORDPRESS ALIGN

options: send to code collectorview all maeghan's snippets
//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;