<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Maverick Web Creations &#187; Style sheet</title>
	<atom:link href="http://www.maverickwebcreations.com/tag/style-sheet/feed" rel="self" type="application/rss+xml" />
	<link>http://www.maverickwebcreations.com</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 05:37:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress CSS</title>
		<link>http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html</link>
		<comments>http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html#comments</comments>
		<pubDate>Wed, 10 Sep 2008 02:56:45 +0000</pubDate>
		<dc:creator>admin_mwc</dc:creator>
				<category><![CDATA[Wordpress Help]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css alignment]]></category>
		<category><![CDATA[Style sheet]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress alignment]]></category>
		<guid isPermaLink="false">http://www.maverickwebcreations.com/?p=115</guid>
		<description><![CDATA[<p>I was wrong about the WordPress CSS stuff being hidden. I actually found the <a href="http://codex.wordpress.org/CSS">official WordPress documentation</a> on the <a href="http://www.maverickwebcreations.com/blog/wordpress-help">WordPress picture alignment</a>.</p>
<p>Apart from the code I mention, WordPress recommends adding this to your style.css too:&#8230; <a href="http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html" class="read_more">Read more...</a></p>]]></description>
			<content:encoded><![CDATA[<p>I was wrong about the WordPress CSS stuff being hidden. I actually found the <a href="http://codex.wordpress.org/CSS">official WordPress documentation</a> on the <a href="http://www.maverickwebcreations.com/blog/wordpress-help">WordPress picture alignment</a>.</p>
<p>Apart from the code I mention, WordPress recommends adding this to your style.css too:</p>
<pre class="brush: css; title: ; notranslate">
.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
/* optional rounded corners for browsers that support it */
-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;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Picture Alignment Secrets</title>
		<link>http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html</link>
		<comments>http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html#comments</comments>
		<pubDate>Thu, 14 Aug 2008 14:51:06 +0000</pubDate>
		<dc:creator>admin_mwc</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress Help]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css alignment]]></category>
		<category><![CDATA[Style sheet]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress alignment]]></category>
		<guid isPermaLink="false">http://www.maverickwebcreations.com/?p=93</guid>
		<description><![CDATA[<p><a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"></a>This picture is aligned to the left of my content. Usually we display pictures to the left or right and have our sentences wrap around it. Try to make your paragraphs longer or reduce the size of the picture to make it look good when wrapped around the text.<a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"></a></p>
<p>If &#8230; <a href="http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html" class="read_more">Read more...</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"><img class="alignleft size-thumbnail wp-image-94" title="dscn7853" src="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853-150x150.jpg" alt="WordPress Picture Alignment Secrets" width="105" height="105" /></a>This picture is aligned to the left of my content. Usually we display pictures to the left or right and have our sentences wrap around it. Try to make your paragraphs longer or reduce the size of the picture to make it look good when wrapped around the text.<a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"><img class="alignright size-thumbnail wp-image-94" title="dscn7853" src="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853-150x150.jpg" alt="WordPress Picture Alignment Secrets" width="150" height="150" /></a></p>
<p>If not it might mess up the layout of your post. What I am trying to do right now is typing in filler text to illustrate my point. The good thing about WordPress&#8217; built-in media upload function is that it has 3 sizes for you to choose &#8211; thumbnail, medium and full size. The picture on the left is the thumbnail-sized picture, which I further reduced in size to match the content of this post.</p>
<p>This picture is now aligned to the right of my content. The trick in aligning pictures is to have enough space to the left or right. In this case, I have enough space right above this paragraph to squeeze in a picture on the right. I used the thumbnail-sized picture and left the size untouched.</p>
<p>This picture is now aligned to the centre of the page. There isn&#8217;t any room to display text on the left or right if you choose to display your pictures in the centre. The picture below is the medium-sized picture that WordPress generated for me.</p>
<p><a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"><img class="aligncenter size-medium wp-image-94" title="dscn7853" src="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853-300x225.jpg" alt="WordPress Picture Alignment Secrets" width="300" height="225" /></a></p>
<p>If you did something similar in your WordPress blog and it did not align like my pictures above, you must have forgotten to add some WordPress CSS code into your CSS style sheet. WordPress didn&#8217;t tell you that, did they?</p>
<p>Add this code to the style.css of your WordPress template to enable these WordPress alignment features in your blog:</p>
<pre class="brush: css; title: ; notranslate">
/* IMAGES */
img.alignleft
{
float: left;
}
img.alignright
{
float: right;
}
img.aligncenter
{
display: block;
margin: 0px auto 0px auto;
}
</pre>
<p>That&#8217;s it! Once you have this block of CSS code in your style sheet, you should be able to align your pictures in WordPress properly.</p>
<p><strong>The WordPress Align Center Bug?</strong></p>
<p>I find this &#8220;bug&#8221; rather interesting. Maybe it isn&#8217;t a flaw in WordPress but it was way this way. Okay, here&#8217;s the thing about this align centre feature&#8230;</p>
<p>When you try to align your picture to the centre the <strong>first time</strong>, WordPress adds some HTML code that looks like this:</p>
<pre class="brush: xml; title: ; notranslate">&lt;img src=&quot;http://whatever.com/picture.jpg&quot; class=&quot;aligncenter&quot; /&gt;</pre>
<p>If you try to align your picture to the centre for the <strong>second time</strong>, WordPress adds more HTML code and it looks something like:</p>
<pre class="brush: xml; title: ; notranslate">&lt;p style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://whatever.com/picture.jpg&quot; class=&quot;aligncenter&quot; /&gt;&lt;/p&gt;</pre>
<p>Notice the extra P HTML tag that is added to your HTML code. Strange isn&#8217;t? Well, if you have added the block of code above, you don&#8217;t have to worry about centre aligning 2 times just to get your picture to align to the centre of the page. It sounds silly but that was what I did before I knew what WordPress actually adds to the HTML code when you try to centre align stuff.</p>
<p>P.S. This picture is really nice &#8220;Kodak&#8221; moment of 3 of my 4 cats. The cat lying down with the back facing the front is Mini. The kitten on the left is Coco and the other kitty on the right is Moca. All my cats have names with 4 letters and I try to give them a cool and &#8220;yummy&#8221; name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

