<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>WebDesign.fm &#187; Tutorials</title>
	<atom:link href="http://www.webdesign.fm/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdesign.fm</link>
	<description></description>
	<lastBuildDate>Tue, 02 Mar 2010 13:28:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" -->
		<copyright>&#xA9; </copyright>
		<managingEditor>russ@russadams.com ()</managingEditor>
		<webMaster>russ@russadams.com()</webMaster>
		<category></category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary></itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>russ@russadams.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.webdesign.fm/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.webdesign.fm/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>WebDesign.fm</title>
			<link>http://www.webdesign.fm</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>CSS Image Basics</title>
		<link>http://www.webdesign.fm/css-image-basics/</link>
		<comments>http://www.webdesign.fm/css-image-basics/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 02:37:22 +0000</pubDate>
		<dc:creator>Russ Adams</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.webdesign.fm/?p=274</guid>
		<description><![CDATA[<p>Post from WebDesign.fm your <a href="http://www.webdesign.fm">web design</a> information source.</p>
<p><a href="http://www.webdesign.fm/css-image-basics/">CSS Image Basics</a></p>
Post from WebDesign.fm your web design information source.
CSS Image Basics
Dressing up images on your website or blog can make the difference between a professional or amateurish look.  Using CSS is an easy way to give your images an extra punch.
Follow along till the end, and I&#8217;ll show you how to put it all together.
Add [...]]]></description>
			<content:encoded><![CDATA[<p>Post from WebDesign.fm your <a href="http://www.webdesign.fm">web design</a> information source.</p>
<p><a href="http://www.webdesign.fm/css-image-basics/">CSS Image Basics</a></p>
<p>Dressing up images on your website or blog can make the difference between a professional or amateurish look.  Using CSS is an easy way to give your images an extra punch.</p>
<p>Follow along till the end, and I&#8217;ll show you how to put it all together.</p>
<h2>Add a border to an image</h2>
<blockquote><p><code>border: 1px solid #ccc;</code></p></blockquote>
<p>1px (pixel) is the width of the border.  Solid specifies the border is a solid line.  #ccc is the <a href="http://html-color-codes.com/">hexadecimal</a> that specifies the color, in this case, light grey.</p>
<p>This can also be written by separating each rule:</p>
<blockquote><p><code>border-width: 1px;<br />
border-style: solid;<br />
border-color: #ccc;</code></p></blockquote>
<p><img src="http://www.webdesign.fm/images/frog.jpg" alt="frog" style="border: 1px solid #ccc;" /></p>
<h2>Adding padding to an image</h2>
<p>Padding is the space between the image and the border.</p>
<p>The following rule will add padding equally around an image:</p>
<blockquote><p><code>padding: 10px;</code></p></blockquote>
<p>To add padding using shorthand use:</p>
<blockquote><p><code>padding: 5px 10px 5px 10px;</code></p></blockquote>
<p>The first padding (5px) above identifies the top of the image.  The second is right.  The third is bottom, and last is left.</p>
<p>If you separate each rule it would look like this:</p>
<blockquote><p><code>padding-top: 5px;<br />
padding-right: 10px;<br />
padding-bottom: 5px;<br />
padding-left: 10px;</code></p></blockquote>
<p><img src="http://www.webdesign.fm/images/frog.jpg" alt="frog" style="border: 1px solid #ccc; padding: 10px; " /></p>
<h2>Adding a margin to an image</h2>
<p>The margin is the space between the outside of the border and the surrounding elements (ex. Text).</p>
<p>To add a margin equally to an image use:</p>
<blockquote><p><code>margin: 25px;</code></p></blockquote>
<p>The shorthand is similar to the padding above:</p>
<blockquote><p><code>margin: 25px 25px 25px 5px;</code></p></blockquote>
<p>Each padding rule can also be separated:</p>
<blockquote><p><code>margin-top: 25px;<br />
margin-right: 25px;<br />
margin-bottom: 25px;<br />
margin-left: 5px;</code></p></blockquote>
<p><img src="http://www.webdesign.fm/images/frog.jpg" alt="frog" style="border: 1px solid #ccc; padding: 10px; margin: 25px 25px 25px 5px; " /></p>
<h2>Wrap text around an image</h2>
<p>Without using this code your image will sit on top of or on bottom of your image.</p>
<blockquote><p><code>float: left;</code></p></blockquote>
<p>To float your image to the right simply replace left with right.<br />
<img src="http://www.webdesign.fm/images/frog.jpg" alt="frog" style="border: 1px solid #ccc; padding: 10px; margin: 25px 25px 25px 5px; float: left;" /></p>
<h2>Tying it all together</h2>
<p>Add the following to your CSS style sheet:</p>
<blockquote><p><code>.postImg {<br />
&nbsp;&nbsp;border: 1px solid #ccc;<br />
&nbsp;&nbsp;padding: 10px;<br />
&nbsp;&nbsp;margin: 25px 25px 25px 5px;<br />
&nbsp;&nbsp;float: left;<br />
}</code></p></blockquote>
<p>Now you just need to add the class to your image tag.</p>
<blockquote><p><code>&lt;img class="postImg" src="frog.jpg" alt="frog" /&gt;</code></p></blockquote>
<p>That&#8217;s it.  Let me know if you have any questions.</p>
<table border="0" cellspacing="15">
<tr>
<td><a title="Share on Twitter!" href="http://twitter.com/home?status=Reading 'CSS Image Basics' http://bit.ly/1QtCr WebDesign.fm @RussAdams" rel="nofollow"><img style="border: 0pt none ;" src="http://www.webdesign.fm/images/twitter.gif" alt="Share on Twitter!" height="92" width="106"></a></td>
<td><a title="Stumble on Stumbleupon!" href="http://www.stumbleupon.com/submit?url=http://www.webdesign.fm/css-image-basics/" rel="nofollow"><img style="border: 0pt none ;" src="http://www.webdesign.fm/images/su.png" width="64" height="64" alt="Stumble on Stumbleupon!" /></a></td>
<td><a title="Bookmark on Del.icio.us!" href="http://delicious.com/post?url=http://www.webdesign.fm/css-image-basics/" rel="nofollow"><img style="border: 0pt none ;" src="http://www.webdesign.fm/images/deli.png" width="64" height="64" alt="Bookmark on Del.icio.us!" /></a></td>
<td><a title="Subscribe to RSS Feed!" href="http://feeds2.feedburner.com/webdesignfm"  rel="nofollow"><img style="border: 0pt none ;" src="http://www.webdesign.fm/images/rss.png" width="64" height="64" alt="Subscribe to RSS Feed!" /></a></td>
</tr>
</table>
<div id="crp_related"><br /><h3>Related Posts:</h3><ul><li><a href="http://www.webdesign.fm/getting-the-most-from-blog-commenting/" rel="bookmark">Getting the Most From Blog Commenting</a></li><li><a href="http://www.webdesign.fm/pr-stunt-google-penalizes-google/" rel="bookmark">PR Stunt? Google Penalizes Google</a></li><li><a href="http://www.webdesign.fm/facebook-tos-goes-full-circle/" rel="bookmark">Facebook TOS Goes Full Circle</a></li><li><a href="http://www.webdesign.fm/rant-css-or-tables-for-layout/" rel="bookmark">Rant: CSS or Tables for Layout</a></li><li><a href="http://www.webdesign.fm/redemption-css-layouts/" rel="bookmark">Redemption: CSS Layouts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.webdesign.fm/css-image-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
