Comment on WordPress Hacks by SEO Dave.

WordPress Hacks WordPress align images fix code.

Got a quick fix for the current Talian theme.

Edit the style.css file in a text editor or via the built in WordPress theme editor and add the following code to the bottom of the file.

.content_talia img {
	margin: 0 0 24px 0;
	max-width: 640px;
}
.alignleft, img.alignleft {
	display: inline;
	float: left;
	margin-right: 24px;
	margin-top: 4px;
}
.alignright, img.alignright {
	display: inline;
	float: right;
	margin-left: 24px;
	margin-top: 4px;
}
.aligncenter, img.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
}
img.alignleft, img.alignright, img.aligncenter {
	margin-bottom: 12px;
}
#content_talia .wp-caption {
	background: #f1f1f1;
	color: #888;
	font-size: 12px;
	line-height: 18px;
	text-align: center;
	margin-bottom: 20px;
	padding: 4px;
}
#content_talia .wp-caption img {
	margin: 5px;
}
#content_talia .wp-caption p.wp-caption-text {
	margin: 0 0 4px;
}
#content_talia .wp-smiley {
	margin:0;
}
#content_talia .gallery {
	margin: auto;
}
#content_talia .gallery .gallery-item {
	float: left;
	margin-top: 10px;
	text-align: center;
	width: 33%;
}
#content_talia .gallery img {
	border: 2px solid #cfcfcf;
}
#content_talia .gallery .gallery-caption {
	margin-left: 0;
}
#content_talia .gallery dl {
	margin: 0;
}
#content_talia .gallery img {
	border: 10px solid #f1f1f1;
}
#content_talia .gallery-caption {
	color: #888;
	font-size: 12px;
	margin:-24px 0 24px 0;
}
#content_talia .gallery br+br {
	display: none;
}

I got the code from the new default WordPress 3 theme called Twenty Ten, so this is the latest features of WordPress 3. I took the gallery code as well since that’s a newish feature (not tried adding a gallery to WordPress though, so untested). I’ll take a look if there’s anything else moved from inline CSS to the main CSS file in WordPress 3 and update accordingly and also any new features I’ve missed. I plan to go through Talian when WordPress 3.0 is released to add any new features etc… there’s quite a few nice updates coming, so expect some major changes.

I’ve tested Talian with the latest WordPress 3 release candidate 1 and it works fine: , so updating to WordPress 3.0 when released shouldn’t need an immediate update of Talian, but obviously any new WP3 features won’t be in the code yet.

David