<?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>Zack Liveimages | Best Premium WordPress Themes - Zack Live</title>
	<atom:link href="http://zacklive.com/tag/images/feed/" rel="self" type="application/rss+xml" />
	<link>http://zacklive.com</link>
	<description>Free Online Resource</description>
	<lastBuildDate>Wed, 21 Dec 2011 20:18:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>CSS: How to Center Your Images</title>
		<link>http://zacklive.com/css-how-to-center-your-images/585/</link>
		<comments>http://zacklive.com/css-how-to-center-your-images/585/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 00:00:09 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Plugins, Tutorials and Hacks]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[text-align]]></category>

		<guid isPermaLink="false">http://zacklive.com/?p=585</guid>
		<description><![CDATA[If you have a paragraph(&#60;p&#62;) or a &#60;div&#62; with only images, it&#8217;s very easy to center them, just set the &#8216;text-align&#8217; to &#8216;center&#8217;: p{ text-align: center } What if there is other content in the paragraph, like text, and you don&#8217;t want it to be centered. Well, one way to do this, is to add [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://zacklive.com/wp-content/uploads/2009/11/css.png"><img class="aligncenter size-full wp-image-586" title="css-tips-tutorials" src="http://zacklive.com/wp-content/uploads/2009/11/css.png" alt="css-tips-tutorials" width="320" height="320" /></a></p>
<p>If you have a paragraph(&lt;p&gt;) or a &lt;div&gt; with only images, it&#8217;s very easy to center them, just set the &#8216;text-align&#8217; to &#8216;center&#8217;:</p>
<blockquote><p>p{ text-align: center }</p></blockquote>
<p>What if there is other content in the paragraph, like text, and you don&#8217;t want it to be centered. Well, one way to do this, is to add a container, for example, a &lt;div&gt;, and the &#8216;text-align&#8217; of the container to &#8216;center&#8217;. But this doesn&#8217;t look like a smart way, as the container is quite a waste. Can I do this within the &lt;img&gt;? Of course, you can make this happen with CSS, Check out the following code:</p>
<blockquote><p>&lt;img style=&#8221;display: block; clear: both; margin-left: auto; margin-right: auto;&#8221; src=&#8221;test.jpg&#8221; /&gt;</p></blockquote>
<p>Just set the &#8216;display&#8217; as &#8216;block&#8217; and both the left and right margin as &#8216;auto&#8217;, that&#8217;s it, or you can add this to you CSS file:</p>
<blockquote><p>p img{ display: block; clear: both; margin-left: auto; margin-right: auto; }</p></blockquote>
<p>Let me know if you have a better idea.</p>
<p><span id="more-585"></span>This article is also posted on<a title="css tips tutorials web design" href="http://gearor.com/css-how-to-center-your-images/70/"> Gearor.com</a>.</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://zacklive.com/devise-authentication-solution-for-ruby-on-rails/3158/" title="Devise: Authentication Solution for Ruby on Rails">Devise: Authentication Solution for Ruby on Rails</a></li><li><a href="http://zacklive.com/amplify-a-jquery-component-library-for-web-designers/3075/" title="Amplify: A JQuery Component Library for Web Designers">Amplify: A JQuery Component Library for Web Designers</a></li><li><a href="http://zacklive.com/user-interface-design-framework-for-web-designer/3049/" title="User Interface Design Framework for Web Designer">User Interface Design Framework for Web Designer</a></li><li><a href="http://zacklive.com/isotope-jquery-plugin-for-flexible-animated-layouts/3031/" title="Isotope: jQuery Plugin for Flexible &#038; Animated Layouts">Isotope: jQuery Plugin for Flexible &#038; Animated Layouts</a></li><li><a href="http://zacklive.com/treesaver-javascript-framework-for-creating-magazine-style-layouts/3026/" title="Treesaver: JavaScript Framework for Creating Magazine-style Layouts">Treesaver: JavaScript Framework for Creating Magazine-style Layouts</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://zacklive.com/css-how-to-center-your-images/585/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

