<?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>Superior Motive - web design &#38; development, Joomla &#38; Drupal CMSes &#187; a list apart</title>
	<atom:link href="http://www.superiormotive.com/tag/a-list-apart/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.superiormotive.com</link>
	<description>web design &#38; development blog by Plethora Design</description>
	<lastBuildDate>Sun, 18 Jul 2010 05:01:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Quick CSS Mockups with Photoshop</title>
		<link>http://www.superiormotive.com/2009/06/13/quick-css-mockups-with-photoshop/</link>
		<comments>http://www.superiormotive.com/2009/06/13/quick-css-mockups-with-photoshop/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 04:20:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[a list apart]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dreamweaver]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[html. xhtml]]></category>
		<category><![CDATA[imageready]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[mockup]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[quick]]></category>
		<category><![CDATA[slices]]></category>
		<category><![CDATA[slicing]]></category>

		<guid isPermaLink="false">http://www.superiormotive.com/?p=35</guid>
		<description><![CDATA[I wrote this article in 2007 for A List Apart, but since then technology has forged ahead, and this technique is now outdated, as the numerous comments illustrate. There seem to be two flavors of comments: designers who appreciated how quickly you could produce an XHTML/CSS mockup pretty straight from Photoshop, and the purists who [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this article in 2007 for A List Apart, but since then technology has forged ahead, and this technique is now outdated, as the numerous <a title="comments on &quot;Quick CSS Mockups with Photoshop&quot;" href="http://www.alistapart.com/comments/quickcssmockupswithphotoshop/" target="_blank">comments</a> illustrate. There seem to be two flavors of comments: designers who appreciated how quickly you could produce an XHTML/CSS mockup pretty straight from Photoshop, and the purists who voiced a vigorous distaste for the dirtiness of this technique, by which they mean that it is not semantic HTML. That is true, but then again, this technique was only meant for mockups, or perhaps as a starting point for a final HTML document. I typically only used this technique for creating quick mockups, but would create the final layout from scratch, coding the HTML and CSS by hand in Dreamweaver and producing the necessary images in Photoshop one by one.</p>
<p>Although the technique is outdated, maybe some of you still use ImageReady and could benefit from this. A discussion of Photoshop guides and slicing techniques is next on my agenda.</p>
<p><strong>Following is the original article, reprinted with the permission of <cite><a href="http://www.alistapart.com/">A List Apart</a></cite> and the author (me!):</strong></p>
<p>You need to make a set of web design mockups for your client. You’d like to find an easy way to show these mockups in clean <span>XHTML</span> and <span>CSS</span> code, because plain JPGs don’t convey the full sense of the design, and sliced tables are evil. In fact, let’s forget table slices ever existed.</p>
<p><strong>Caveat:</strong> This article is for people who need to produce valid, standards-compliant <em>mockups</em> quickly, with the graphics tools they already use. This is not a <em>production</em> technique for people who want to get the most benefit out of (X)HTML by creating structural, semantic markup. Creating structural, semantic markup, as <cite>A List Apart</cite> and most standardistas recommend, still takes time, thought, and hand-coding.</p>
<p><span>WYSIWYG</span> graphics editors such as Fireworks, GoLive, and ImageReady allow you to generate <span>HTML</span> code, but the exported code tends to use tables or absolute positioning. That’s so 1999. So what, then, can these programs do in terms of producing valid and useful code? More than you think. I’ll show you an easy way to produce mockups with Photoshop, prepare them for the web with ImageReady, and clean up the code afterward.</p>
<h2>Background</h2>
<p>I must admit, Fireworks was a major part of my design arsenal until I started taking accessibility and standards compliance seriously, and I don’t think I’m alone here. The problem I ran into was that I could only export <span>HTML</span> code using tables, when what I really wanted was relatively positioned <code>div</code> elements. Only with ridiculous hours of coding and copious quantities of caffeine could you convert such a table to relative <code>div</code>s, and this just steals more time from when you could have been designing more mockups or sleeping. So why start off with a sliced table at all? What I needed was a way to generate clean relatively positioned <code>div</code>s—or, barring that, code that was close enough that it wouldn’t take aeons to make it play nice with <span>W3C</span> standards. These days, this is surprisingly straightforward with ImageReady.</p>
<h2>Make ImageReady <span>CSS</span>-ready</h2>
<p>Adobe Photoshop CS ships with a web-focused sidekick: ImageReady CS. Adobe Fireworks is great for vector applications, but less so for raster work. Conversely, ImageReady is perfectly suited for raster work, but less so for vector work (although that’s changing). Using ImageReady, you can export slices as absolutely positioned <code>div</code>s, which can be easily transformed into relatively positioned <code>div</code>s.</p>
<p>This means you can start off in Photoshop to do all your complex masking, fades, Illustrator vector art, filters, etc., and then switch to ImageReady to slice up your layout. You’ll want to be sure that your layout is aligned to the top left; don’t try to center it just yet—that’s a job for <span>CSS</span> later on. Using ImageReady, you can style your navigation menu items (unless you’re doing that with pure text / <span>CSS</span>) and set rollover states. (For a production layout, you would probably shy away from Adobe rollovers and actions in favor of your own JavaScript or <span>CSS</span> rollovers, but for mockup use, these rollover states should suffice.)</p>
<h2>Slice it up</h2>
<p>Use the <span>Slice</span> tool to create your slices. Once you’re finished use the <span>Slice Select</span> tool to select and rename each section. For example, you may have a header that will become a <code>div</code> tag later on. ImageReady would really like to call this “Yourfile_1_01,” but you’ll save yourself some work by giving it a logical name from the start, like “header”. You will use this later on when editing your <span>CSS</span>. The same goes for the content area, any side columns, the footer, and other areas you may want to define.</p>
<p>Jump back and forth between designing in Photoshop and ImageReady until you’re ready to test out your design in a browser. Then, in ImageReady, go to <span>File › Preview In ›</span> (insert favorite browser here). See whether your slices look and behave as intended, and modify your optimization settings accordingly. Exported slices will result in <span>JPG</span> or <span>GIF</span> images inserted into <code>div</code> tags with <code>img</code> tags; later, you may want to insert some of the images as background images for the individual <code>div</code>s instead.</p>
<h2>Exporting  <span>HTML </span>&amp; <span>CSS</span></h2>
<p>Set your output settings: select <span>File › Output Settings › <span>HTML</span></span> and change the settings to your liking. Note that you can opt to generate <span>XHTML</span> code. Select “Next” and check the settings in <span>Saving <span>HTML </span>Files</span>.</p>
<p>Select “Next” again; this brings you to <span>Slices</span>. Here you can choose to “Generate <span>CSS</span>.” Next to <span>Referenced</span>, you’ll see a dropdown menu that allows you to choose <span>By ID</span>, <span>Inline</span>, or <span>By Class</span>. Select <span>By ID</span>. You can also get detailed with slice naming conventions if you’re so inclined.</p>
<p>Export your mockup to (X)HTML/CSS using <span>File › Save Optimized As</span>, and choose a location that makes sense to you. Note that ImageReady will create an <code>/images</code> subdirectory in the same location where you save the <span>HTML</span> file. (Line wraps marked » <em>—Ed.</em>)</p>
<h3>Example of ImageReady-produced <span>CSS</span></h3>
<pre>#header {
position:absolute;
left:0px;
top:0px;
width:800px;
height:150px;
}</pre>
<h3>Example of ImageReady-produced <span>HTML</span></h3>
<p>(Line wraps marked » <em>—Ed.</em>)</p>
<pre>&lt;div id="Table_01"&gt;
  &lt;div id="header"&gt;

    &lt;img id="header" src="images/header.jpg" <strong>»</strong>
width="800" height="150" alt="" /&gt;
  &lt;/div&gt;
  &lt;div id="navigation"&gt;
    &lt;img id="navigation" src="images <strong>»</strong>
/navigation.jpg" width="200" height="450" <strong>»</strong>
alt="" /&gt;

  &lt;/div&gt;
  &lt;div id="content"&gt;
    &lt;img id="content" src="images/content.jpg" <strong>»</strong>
 width="600" height="450" alt="" /&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
<h2>Toast, anyone?</h2>
<p>We now have slices consisting of absolutely positioned <code>div</code>s, with the <span>CSS</span> contained directly in the <span>HTML</span> file’s <code>head</code>. Maybe absolutely positioned <code>div</code>s are just what you need—if so, grab a cup of coffee and relax. Otherwise, let’s take things a step further by converting these <code>div</code>s to relative positioning.</p>
<p>First, make a copy of the ImageReady-generated <span>HTML</span> file and open it in your code editor (e.g. Dreamweaver, BBEdit, or another favorite editor). You’ll probably want to wrap all your <code>div</code>s inside an outside container <code>div</code> to control your mockup layout more precisely.  ImageReady exports the <span>CSS</span> slices as <code>div</code>s and wraps them in a container <code>div</code> called “Table_01.” Rename the “Table_01” <code>div</code> (to “container”, for example) and style it with <span>CSS</span> as you see fit. If you don’t need a container <code>div</code>, just delete the “Table_01” <code>div</code> and its <span>CSS</span> counterpart.</p>
<p>Next, switch all your other <code>div</code>s to relative positioning by removing the absolute positioning declarations and letting them inherit relative positioning. Pay special attention to your floats and clears. You could try to switch all your <code>div</code>s at once, but a more precise and predictable way to go about it is to change one <code>div</code> at a time and check each <code>div</code> individually.</p>
<p>For <code>div</code>s that contain images, decide which should be turned into <span>CSS</span> background images and which really deserve an image tag. Some slices (a content area, for example) may be of a single color and thus should be set using a <span>CSS</span> style without any images. Set the overall page background separately using your stylesheet. If this were a production layout, you’d probably move your <span>CSS</span> to an external stylesheet, but that may be overkill for single-page mockups. Validate your code and you’re good to go.</p>
<h3>Example of converted and cleaned-up <span>CSS</span></h3>
<pre>#header {
float: left;
clear: right;
}</pre>
<p>You’ll need to add appropriate height and width declarations back in if the image in this element becomes a background image in a later revision.</p>
<h3>Example of converted and cleaned-up <span>HTML</span></h3>
<p>(Line wraps marked » <em>—Ed.</em>)</p>
<pre>&lt;div id="header"&gt;
  &lt;img src="images/header.jpg" alt="" <strong>»</strong>
name="headerimg" width="800" height="150" <strong>»</strong>
id="headerimg" /&gt;

&lt;/div&gt;</pre>
<h2>Workflow</h2>
<p>When you need to revise the mockup, you can simply make your graphic changes in Photoshop and ImageReady, then re-export the <span>HTML</span> file, overwriting the original one and its supporting images in the <code>/images</code> subfolder. But before you do, make sure you’ve saved your <em>converted, cleaned-up <span>HTML</span> file</em> under a different name so it and its stylesheet will refer to the updated images without the danger of being overwritten by your newly exported revised <span>HTML</span>.</p>
<p><a href="http://www.alistapart.com/articles/quickcssmockupswithphotoshop/" target="_blank">View the original article over at A List Apart</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;partner=sociable" title="Print"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;title=Quick%20CSS%20Mockups%20with%20Photoshop&amp;bodytext=I%20wrote%20this%20article%20in%202007%20for%20A%20List%20Apart%2C%20but%20since%20then%20technology%20has%20forged%20ahead%2C%20and%20this%20technique%20is%20now%20outdated%2C%20as%20the%20numerous%20comments%20illustrate.%20There%20seem%20to%20be%20two%20flavors%20of%20comments%3A%20designers%20who%20appreciated%20how%20quickly%20you%20co" title="Digg"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F" title="Sphinn"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;title=Quick%20CSS%20Mockups%20with%20Photoshop&amp;notes=I%20wrote%20this%20article%20in%202007%20for%20A%20List%20Apart%2C%20but%20since%20then%20technology%20has%20forged%20ahead%2C%20and%20this%20technique%20is%20now%20outdated%2C%20as%20the%20numerous%20comments%20illustrate.%20There%20seem%20to%20be%20two%20flavors%20of%20comments%3A%20designers%20who%20appreciated%20how%20quickly%20you%20co" title="del.icio.us"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;t=Quick%20CSS%20Mockups%20with%20Photoshop" title="Facebook"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;title=Quick%20CSS%20Mockups%20with%20Photoshop" title="Mixx"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;title=Quick%20CSS%20Mockups%20with%20Photoshop&amp;annotation=I%20wrote%20this%20article%20in%202007%20for%20A%20List%20Apart%2C%20but%20since%20then%20technology%20has%20forged%20ahead%2C%20and%20this%20technique%20is%20now%20outdated%2C%20as%20the%20numerous%20comments%20illustrate.%20There%20seem%20to%20be%20two%20flavors%20of%20comments%3A%20designers%20who%20appreciated%20how%20quickly%20you%20co" title="Google Bookmarks"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;title=Quick%20CSS%20Mockups%20with%20Photoshop&amp;source=Superior+Motive+-+web+design+%26amp%3B+development%2C+Joomla+%26amp%3B+Drupal+CMSes+web+design+%26amp%3B+development+blog+by+Plethora+Design&amp;summary=I%20wrote%20this%20article%20in%202007%20for%20A%20List%20Apart%2C%20but%20since%20then%20technology%20has%20forged%20ahead%2C%20and%20this%20technique%20is%20now%20outdated%2C%20as%20the%20numerous%20comments%20illustrate.%20There%20seem%20to%20be%20two%20flavors%20of%20comments%3A%20designers%20who%20appreciated%20how%20quickly%20you%20co" title="LinkedIn"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;t=Quick%20CSS%20Mockups%20with%20Photoshop" title="MySpace"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.superiormotive.com/feed/" title="RSS"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Quick%20CSS%20Mockups%20with%20Photoshop&amp;url=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F" title="Slashdot"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;title=Quick%20CSS%20Mockups%20with%20Photoshop" title="StumbleUpon"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F" title="Technorati"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F&amp;t=Quick%20CSS%20Mockups%20with%20Photoshop&opener=bm&amp;ei=UTF-8&amp;d=I%20wrote%20this%20article%20in%202007%20for%20A%20List%20Apart%2C%20but%20since%20then%20technology%20has%20forged%20ahead%2C%20and%20this%20technique%20is%20now%20outdated%2C%20as%20the%20numerous%20comments%20illustrate.%20There%20seem%20to%20be%20two%20flavors%20of%20comments%3A%20designers%20who%20appreciated%20how%20quickly%20you%20co" title="Yahoo! Bookmarks"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=Quick%20CSS%20Mockups%20with%20Photoshop%20-%20http%3A%2F%2Fwww.superiormotive.com%2F2009%2F06%2F13%2Fquick-css-mockups-with-photoshop%2F" title="Twitter"><img src="http://www.superiormotive.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.superiormotive.com/2009/06/13/quick-css-mockups-with-photoshop/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
