<?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>jc-designs.net &#187; Photoshop</title>
	<atom:link href="http://jc-designs.net/blog/category/web-development/photoshop-web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://jc-designs.net/blog</link>
	<description>jc-designs blog</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:30:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How to slice up a PSD file in Photoshop</title>
		<link>http://jc-designs.net/blog/2010/07/how-to-slice-up-a-psd-file-in-photoshop/</link>
		<comments>http://jc-designs.net/blog/2010/07/how-to-slice-up-a-psd-file-in-photoshop/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 03:47:55 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=459</guid>
		<description><![CDATA[Because its quick I am jumping around in topics lately from CSS, to jQuery, to WordPress, to blogging, and now onto Photoshop. This is good though. Something different every day. Yesterday I had the pleasure of helping out someone who wants to learn how to create a websites. After the the short lesson I gave [...]]]></description>
			<content:encoded><![CDATA[<h3>Because its quick</h3>
<p>I am jumping around in topics lately from CSS, to jQuery, to WordPress, to blogging, and now onto Photoshop. This is good though. Something different every day. Yesterday I had the pleasure of helping out someone who wants to learn how to create a websites. After the the short lesson I gave him, he said &#8220;Wow&#8230;I have a lot to learn.&#8221; To which I replied with a simple yes. He had coded a page, and then had me look at it. At which point I broke him of some nasty habits. This bit of teaching had me thinking though. What are some things I see some people do that makes me shake my head, when I know there is an easier way. </p>
<p>The first thing that popped into my brain was watching someone use the eraser tool in Photoshop to take away the background around an image of a person. That is just plain crazy. But there was a second item I thought about just after that nonsense. Slicing up a Photoshop PSD file to be used as a web page. I know people who do things differently, like using guides and then cropping the images necessary. That takes a while, even though I know one guy who is pretty damn quick at it. For me though, slicing is the way to go. It&#8217;s quick, easy, and if you need to make a change, there is no cropping involved &#8211; just a re-save.</p>
<p><span id="more-459"></span></p>
<h3>Let&#8217;s cut some stuff up!</h3>
<p>First, let&#8217;s start out with a template I am building for a personal project of mine. You can see what it will look like with some content thrown in. Standard stuff&#8230;logo, header, nav, left column for content, sidebar for some links, and a footer.</p>
<div class="center">
<img src="http://www.jc-designs.net/newimages/blogImages/helix1.jpg" alt="Template image" />
</div>
<p><img src="http://www.jc-designs.net/newimages/blogImages/helix2.jpg" alt="Slice tool in Photoshop" class="right" />Before you do any slicing though, you need to hide all the content crap, because you don&#8217;t want that being part of the image. After you have hidden all that stuff, you will want to save the file but with a different name, or like I do and put _sliced at the end of it. Once you have done all that, you need to grab the slice tool, which you can see highlighted in the image to the right (looks like an exacto knife). If you don&#8217;t see it in your tool bar, it is hidden behind the crop tool.</p>
<p>Now for the actual slicing. Imagine you took a pair of scissors and cut the sections out that you needed. Piece of cake! Click on the slice tool, and start dragging across the psd file. In the image below, I started from the top left corner, and dragged down to the beginning of the the navigation section on the far right. I left go of the mouse button, clicked immediately, and dragged to the left side to the top of the content section. Then I repeated doing that until I had what you see below (in order to save this as a single image this does not show the actual slice lines- just red lines where they would be).</p>
<div class="center">
<img src="http://www.jc-designs.net/newimages/blogImages/helix3.jpg" alt="Sliced psd file" />
</div>
<h3>That&#8217;s great&#8230;but what do I do with it now?</h3>
<p>I&#8217;ll explain the numbers in a bit, and then I&#8217;ll show you what the html would look like. But first, you have to save it for the web. I am going to assume you at least know how to do that, because it would take a silly amount of time to explain. With a sliced image, when you Save for Web, you select the type you want, jpg in this case, and then browse to where your images folder is, but don&#8217;t select it. You don&#8217;t actually want to be in the images folder otherwise it will create another images folder within it. When you save a sliced image like this, it is going to save multiple images. You then choose a name that you want to save them as (I usually choose a name like &#8216;index&#8217; because I can remember what image goes where that way). This is what makes slicing so fast and easy.</p>
<p>The beauty is, if you have to go back and make a change to the psd file, you go and do it, and resave as the name you chose. In my example here, I would have 6 images after I saved &#8211; index_01.jpg, index_02.jpg&#8230;all the way to 06.</p>
<h3>The HTML</h3>
<p>Before I explain the numbers, lets take a look at what the HTML might look like:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div id=&quot;container&quot;&gt;
&lt;div id=&quot;header&quot;&gt;
&lt;div id=&quot;logo&quot;&gt;&lt;!--logo html goes here --&gt;&lt;/div&gt;
&lt;h1&gt;Your Heading Goes Here&lt;/h1&gt;
&lt;/div&gt;
&lt;div id=&quot;navigation&quot;&gt;&lt;!--nav html goes here --&gt;&lt;/div&gt;
&lt;div id=&quot;contentRepeat&quot;&gt;
&lt;div id=&quot;contentBottom&quot;&gt;
&lt;div id=&quot;contentTop&quot;&gt;
&lt;!-- content html goes here - main content, and sidebar divs --&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;&lt;!--footer html goes here --&gt;&lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<h3>NOW let&#8217;s talk about the numbers</h3>
<p>So I now have 6 images and the basic HTML. Now what? Now the fun part. All of the CSS, which I won&#8217;t go through, but give you the gist of it. It would be a very long post if I types all that out, and the point of this isn&#8217;t the actual CSS, but how to do the slicing, and what to do with it.</p>
<p>Your basic CSS for the divs would be:</p>
<ul>
<li>header: background image using #1 (index_01.jpg),and no-repeat</li>
<li>navigation: background image using #2(index_02.jpg), and no-repeat</li>
<li>contentRpeat: background image using #4 (index_04.jpg), and repeat-y</li>
<li>contentBottom: background image using #5 (index_05.jpg), no-repeat and a position of left bottom</li>
<li>contentTop: background image using #3 (index_03.jpg), no-repeat and a position of left top, with a min height value of what ever the height is of index_03.jpg</li>
</ul>
<p>The #6 image (index_06) is never used since it is just a solid color, so you can toss it in the trash.</p>
<h3>Any final words?</h3>
<p>Slices are awesome in that it is easy to make a change to the PSD file, and re-save, without having to re-crop everything. You can cut the image up into as many pieces as you want, just be sure to zoom in and double check all of your slice lines are touching&#8230;not overlapping or too short by a pixel. Otherwise you will end up with an additional image and things will look messed up when you lay it out. Once you get the hang of slicing, going from Photoshop to web page becomes a breeze.</p>
<p>Do you use slicing already? Or are you a guide and crop type person? Maybe you have a completely other method I am not familiar with? Comment and let me know!</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=459" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/07/how-to-slice-up-a-psd-file-in-photoshop/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

