<?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>zomigi.com &#187; Flexible Web Design</title>
	<atom:link href="http://zomigi.com/tags/flexible-web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://zomigi.com</link>
	<description>The professional blog of Zoe Mickley Gillenwater</description>
	<lastBuildDate>Wed, 28 Jul 2010 21:36:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SXSW stuff: book giveaway, my panel, more</title>
		<link>http://zomigi.com/blog/sxsw-stuff/</link>
		<comments>http://zomigi.com/blog/sxsw-stuff/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 15:49:42 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[SXSW]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=311</guid>
		<description><![CDATA[Come meet me at SXSW 2010, see my panel, and maybe even get a free copy of my book. In the meantime, help me get ready! I'm a noob, people.]]></description>
			<content:encoded><![CDATA[<p>Next Thursday, I&#8217;m flying out to Austin for my first SXSW. I&#8217;m excited and a little overwhelmed. But let&#8217;s start with the exciting stuff.</p>
<h3>Meeting you</h3>
<p>I&#8217;m excited to meet you guys! Please come up and introduce yourselves. Hooray for new friends! To find me, <a href="http://twitter.com/zomigi/">follow me on Twitter</a>. I haven&#8217;t yet figured out which app to use for planning my schedule. (That&#8217;s one of the overwhelming things. More on that later.)</p>
<h3>Book giveaway</h3>
<p>I&#8217;m going to have a few copies of my book, <a href="http://www.flexiblewebbook.com/">Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</a>, to give away. Want one? Find me and tell me why you want to learn about flexible design. iPad is an acceptable one word answer. Then presto, the book (if I haven&#8217;t given them all away yet) is yours!</p>
<p>I&#8217;ll probably also have flyers with a discount code for buying Flexible Web Design. Hopefully.</p>
<h3>My panel</h3>
<p>I&#8217;m presenting in the <a href="http://my.sxsw.com/events/event/546">CSS3 Design with HTML5</a> workshop at 3:30 on Saturday in Ballroom F, with Christopher Schmitt and Stephanie Sullivan. Come check it out. As long as you&#8217;re not going to heckle me and post mean things on Twitter, that is.</p>
<h3>Halp! I&#8217;m a noob!</h3>
<p>Ok, now the overwhelming stuff. I have no idea how this SXSW thing works. If anyone has any essential tips, or links to articles with tips, I will love you forever. Some of the questions that are going through my mind:</p>
<ul>
<li>How many business cards should I take with me?</li>
<li>Which of the myriad scheduling apps should I use?</li>
<li>What are the best iPhone apps to help me through? (Note: I don&#8217;t have an iPhone, just an iPod Touch. Don&#8217;t hate me.)</li>
<li>Which are the best events and parties to go to for schmoozing?</li>
<li>Which are the best parties to go to for having fun? (Note: I don&#8217;t drink. But I still like to have fun.)</li>
<li>What do women typically wear during the day? What about to parties at night?</li>
<li>Where can I eat good food for cheap?</li>
<li>Does Austin have any good bakeries, and if so, how can I get my hands on some delicious cookies? (This is always my first question when traveling. I always try to find the nearest bakery to my hotel. Sadly, most cities do not have bakeries up to my standards. At least, not cookie bakeries.)</li>
</ul>
<p>Ok, that&#8217;s enough for now. Again, come meet me, see my panel, hang out.</p>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/sxsw-stuff/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>70+ essential resources for creating liquid and elastic layouts</title>
		<link>http://zomigi.com/blog/essential-resources-for-creating-liquid-and-elastic-layouts/</link>
		<comments>http://zomigi.com/blog/essential-resources-for-creating-liquid-and-elastic-layouts/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 20:05:57 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[liquid]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=270</guid>
		<description><![CDATA[Check out these great online resources on creating liquid/fluid and elastic layouts, including sources for design inspiration, downloadable templates, frameworks, articles and tutorials.]]></description>
			<content:encoded><![CDATA[<p>I often get asked for my recommendations of resources to learn how to create liquid/fluid and elastic layouts. My first answer is, of course, my own book <a href="http://zomigi.com/publications/#pub-fwd"><em>Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</em></a>. Hey, is it so bad to be proud of your work? It&#8217;s the only book out there entirely devoted to designing and building flexible web sites, and the dozens of layout techniques it covers can also be applied to fixed-width design. But I&#8217;ll shut up about my book now; if you&#8217;re not the book-buying type, here are over 70 online resources to get you started creating attractive and robust flexible web pages.</p>
<h2>Design inspiration</h2>
<p>It&#8217;s always helpful to look at existing liquid and elastic sites to get inspiration for how to design your own. I&#8217;ve pulled together several sources of flexible design inspiration in a couple former blog posts on my site:</p>
<ul>
<li><a href="http://zomigi.com/blog/inspiration-for-flexible-web-design/">Inspiration for flexible web design</a></li>
<li><a href="http://zomigi.com/blog/the-liquid-web-site-motherload/">The liquid web site motherload</a></li>
</ul>
<h2>Templates</h2>
<p>Even if you don&#8217;t read my book, you can <a href="http://www.flexiblewebbook.com/files.html">download the example and exercise files</a> from the book&#8217;s companion site. They essentially give you several <a href="http://www.flexiblewebbook.com/files.html">liquid and elastic layout templates or starter pages</a> that you can use to build your own liquid and elastic sites.</p>
<p>Here are some other layout templates:</p>
<ul>
<li>Matthew James Taylor&#8217;s <a href="http://matthewjamestaylor.com/blog/perfect-multi-column-liquid-layouts">liquid</a> and <a href="http://matthewjamestaylor.com/blog/ultimate-multi-column-liquid-layouts-em-and-pixel-widths">elastic layouts</a></li>
<li><a href="http://blog.html.it/layoutgala/">Layout Gala liquid layouts</a></li>
<li><a href="http://layouts.ironmyers.com/100_percent_Layouts/">IronMyers liquid layouts</a></li>
<li><a href="http://css-tricks.com/downloads/layouts-templates/">CSS-Tricks liquid layouts</a> (see &#8220;Layout Packs&#8221; third on page)</li>
<li><a href="http://www.dynamicdrive.com/style/layouts/category/C13/">Dynamic Drive CSS liquid layouts</a></li>
<li><a href="http://themeforest.net/browse/attributes/layout/liquid">ThemeForest&#8217;s liquid fully-designed templates</a></li>
<li><a href="http://wordpress.org/extend/themes/tags/flexible-width">WordPress flexible themes</a></li>
</ul>
<p><span id="more-270"></span>Here are some frameworks and grid systems that allow you to make liquid and/or elastic layouts:</p>
<ul>
<li><a href="http://www.fluidgrid.net/">Fluid Grid framework</a></li>
<li><a href="http://fluid.newgoldleaf.com/">Fluid Grid System framework</a></li>
<li><a href="http://designinfluences.com/fluid960gs/">Fluid 960 Grid System</a></li>
<li><a href="http://aplus.rs/css/em-based-typographic-grid/">aplus elastic grid</a></li>
<li><a href="http://elasticss.com/">Elastic framework</a> (elastic and liquid)</li>
<li><a href="http://code.google.com/p/emastic/">Emastic framework</a> (elastic and liquid)</li>
<li><a href="http://developer.yahoo.com/yui/grids/">YUI Grids CSS</a> (liquid)</li>
<li><a href="http://www.yaml.de/en/home.html">YAML framework</a> (elastic and liquid)</li>
<li><a href="http://www.1kbgrid.com/">The 1kb CSS Grid</a> can be adapted for liquid layouts (see description halfway through <a href="http://www.usabilitypost.com/2009/06/19/the-1kb-css-grid-part-3/">this article</a>)</li>
</ul>
<h2>Articles</h2>
<p>Here are some general articles on the what and why of flexible layouts:</p>
<ul>
<li><a href="http://www.flexiblewebbook.com/downloads/FlexibleWebDesign_sample_ch1.pdf">Sample of Chapter 1: Understanding Flexible Layouts</a> (PDF, from Flexible Web Design book)</li>
<li><a href="http://www.smashingmagazine.com/2009/06/02/fixed-vs-fluid-vs-elastic-layout-whats-the-right-one-for-you/">Fixed vs. Fluid vs. Elastic Layout: What’s The Right One For You?</a> (Smashing Magazine)</li>
<li><a href="http://green-beast.com/blog/?p=199">CSS Layouts: The Fixed. The Fluid. The Elastic.</a> (Beast-Blog.com)</li>
<li><a href="../blog/why-browser-zoom-shouldnt-kill-flexible-layouts/">Why browser zoom shouldn’t kill flexible layouts</a></li>
<li><a title="Permanent Link: Elastic layout – wrong term?" rel="bookmark" href="http://alastairc.ac/2007/01/elastic-layout-wrong-term/">Elastic layout – wrong term?</a> (AlastairC)</li>
<li><a href="http://alastairc.ac/2006/05/accessible-layouts/">Accessible layouts</a> (AlastairC)</li>
<li><a href="http://www.sitepoint.com/blogs/2009/04/17/flexible-designs-dying-out/">Where Have All the Flexible Designs Gone?</a> (Sitepoint)</li>
<li><a href="http://www.smashingmagazine.com/2008/06/26/flexible-layouts-challenge-for-the-future/">Flexible Layouts: Challenge For The Future</a> (Smashing Magazine)</li>
<li><a href="http://www.alistapart.com/articles/elastic/">Elastic Design</a> (A List Apart)</li>
<li><a href="http://adactio.com/journal/1156">Fixtorati</a> (Adactio)</li>
<li><a href="http://www.maxdesign.com.au/presentation/liquid-layouts/index.htm">Liquid layouts using CSS &#8211; the joy, the pain, the tears</a> (presentation at Web Essentials 05)</li>
</ul>
<p>Understanding min-width and max-width is essential to working with flexible layouts:</p>
<ul>
<li>Sitepoint&#8217;s CSS reference on <a href="http://reference.sitepoint.com/css/min-width">min-width</a> and <a href="http://reference.sitepoint.com/css/max-width">max-width</a></li>
<li><a href="http://www.flexiblewebbook.com/downloads/FlexibleWebDesign_MinMaxIE.pdf">Add min-width and max-width Support in Internet Explorer 6</a> (PDF, from Flexible Web Design book)</li>
</ul>
<p>Understanding line lengths is also essential. Although popular belief is that there&#8217;s a narrow band of line lengths that are ideal for everyone&#8217;s reading comfort, the (limited) research that&#8217;s been done on on-screen reading suggests that there is a much larger range of effective line lengths, and that there is a difference between preference and efficacy. Age, disability, reading level, native language, leading, and other factors can all impact which line lengths are most effective for specific individuals in specific situations. See these articles for details:</p>
<ul>
<li><a href="http://www.viget.com/advance/the-line-length-misconception/">The Line Length Misconception</a> (Viget Advance)</li>
<li><a href="http://www.usability.gov/pubs/082006news.html">Reading Onscreen: The Effects of Line Length on Performance</a> (usability.gov)</li>
<li><a href="http://www.surl.org/usabilitynews/72/LineLength.asp">The Effects of Line Length on Reading Online News</a> (SURL Usability News)</li>
<li><a href="http://www.surl.org/usabilitynews/42/text_length.asp">The Effects of Line Length on Children and Adults&#8217; Online Reading Performance</a> (SURL Usability News)</li>
<li><a href="http://webusability.com/article_line_length_12_2002.htm">Optimal Line Length: Research Supporting How Line Length Affects Usability</a> (webusability.com)</li>
<li><a href="http://www.humanfactors.com/downloads/feb03.asp">Reading Text Online</a> (UI Design Newsletter)</li>
<li><a href="http://cssing.blogspot.com/2004/08/line-length-is-not-different-than-any.html">Line-length is not different than any other user preference</a> (CSSing)</li>
</ul>
<h2>Tutorials</h2>
<p>Here are tutorials on creating multiple-column liquid and elastic layouts:</p>
<ul>
<li><a href="http://www.maxdesign.com.au/presentation/liquid/index.htm">Liquid layouts the easy way</a> (Max Design)</li>
<li><a href="http://www.webreference.com/authoring/style/sheets/css_mastery2/">CSS Mastery: Fixed-Width, Liquid, and Elastic Layouts and Faux Columns</a> (excerpt from CSS Mastery on webreference.com)</li>
<li><a href="http://www.456bereastreet.com/archive/200504/fixed_or_fluid_width_elastic/">Fixed or fluid width? Elastic!</a> (456 Berea Street)</li>
<li><a href="http://www.communitymx.com/abstract.cfm?cid=DB750">Creating Elastic Layouts with the em Unit</a> (Community MX)</li>
<li><a href="http://jontangerine.com/log/2007/09/the-incredible-em-and-elastic-layouts-with-css">The Incredible Em &amp; Elastic Layouts with CSS</a> (Jon Tan)</li>
<li><a href="http://www.alistapart.com/articles/fluidgrids/">Fluid Grids</a> (A List Apart)</li>
<li><a href="http://www.markboulton.co.uk/journal/comments/five-simple-steps-to-designing-grid-systems-part-5">Five simple steps to designing grid systems — Part 5</a> (on liquid grids, by Mark Boulton)</li>
<li><a href="http://christopherschmitt.com/2007/10/23/css-floats-to-display-columns-in-any-order/">CSS Floats to Display Columns in Any Order</a> (Christopher Schmitt)</li>
<li><a href="http://forabeautifulweb.com/blog/about/changingman_layout_updated">Changingman layout (updated)</a> (also a template, from For a Beautiful Web)</li>
<li><a href="http://24ways.org/2006/intricate-fluid-layouts">Intricate Fluid Layouts in Three Easy Steps</a> (24 Ways)</li>
<li><a href="http://www.alistapart.com/articles/holygrail/">In Search of the Holy Grail</a> (A List Apart)</li>
<li><a href="http://www.alistapart.com/articles/negativemargins/">Creating Liquid Layouts with Negative Margins</a> (A List Apart)</li>
<li><a href="http://www.smashingmagazine.com/2009/07/27/the-definitive-guide-to-using-negative-margins/">The Definitive Guide to Using Negative Margins</a> (Smashing Magazine)</li>
<li><a href="http://www.mindfly.com/blog/post/2009/01/12/Get-Refreshed-Liquid-Layouts-With-Simpler-CSS-and-Without-A-Semantic-Mess.aspx">Get Refreshed: Liquid Layouts With Simpler CSS and Without A Semantic Mess</a> (Mindfly)</li>
<li><a href="http://www.alistapart.com/articles/multicolumnlayouts/">Multi-Column Layouts Climb Out of the Box</a> (A List Apart)</li>
<li><a href="http://boagworld.com/design/fluid-elastic-design"><span style="position: relative;">Fluid elastic design</span></a> (Boagworld)</li>
<li><a href="http://www.peachpit.com/articles/article.aspx?p=1322358">Using the Liquid CSS Layouts in Dreamweaver CS4</a> (excerpt from Mastering CSS with Dreamweaver CS4 on peachpit.com)</li>
<li><a href="http://www.socialgeek.be/blog/read/flexible-equal-height-columns">Flexible equal height columns</a> (SocialGeek)</li>
<li><a href="http://valums.com/vertical/">Vertical Centering with CSS</a> (Andrew Valums)</li>
</ul>
<p>Creating successful flexible pages is about more than just the layout; you have to make sure the content inside the layout can be flexible too. Here are tutorials on making content, backgrounds, and other effects work with flexible layouts:</p>
<ul>
<li><a href="http://www.communitymx.com/abstract.cfm?cid=AFC58">Creating Liquid Faux Columns</a> (Community MX)</li>
<li><a href="http://nickcowie.com/2005/elastic-faux-columns/">Elastic Faux Columns</a> (Nick Cowie)</li>
<li><a href="http://www.sohtanaka.com/web-design/smart-columns-w-css-jquery/">Smart Columns w/ CSS &amp; jQuery</a> (Soh Tanaka)</li>
<li><a href="http://css-tricks.com/equidistant-objects-with-css/">Equidistant Objects with CSS</a> (CSS-Tricks)</li>
<li><a href="http://www.flexiblewebbook.com/downloads/FlexibleWebDesign_sample_ch9.pdf">Sample of Chapter 9: Creating Flexible Images</a> (PDF, from Flexible Web Design book)</li>
<li><a href="../blog/foreground-images-that-scale-with-the-layout/">Foreground images that scale with the layout</a> (pure CSS solution)</li>
<li><a href="http://buildinternet.com/2009/07/quick-tip-resizing-images-based-on-browser-window-size/">Quick Tip – Resizing Images Based On Browser Window Size</a> (JavaScript solution, from Build Internet!)</li>
<li><a href="../blog/creating-sliding-composite-images/">Creating sliding composite images</a></li>
<li><a href="../blog/css-effect-space-images-out-to-match-text-height/">CSS effect: space images out to match text height</a></li>
<li><a href="../blog/hiding-and-revealing-portions-of-images/">Hiding and revealing portions of images</a></li>
<li><a href="http://www.sitepoint.com/blogs/2007/12/20/stretchy-images-with-html-and-css/">Stretchy Images with HTML and CSS</a> (Sitepoint)</li>
<li><a href="http://friedcellcollective.net/outbreak/2009/10/04/fluid-searchbox/">Fluid searchbox</a> (outbreak)</li>
</ul>
<p>This should keep you busy for a while, no? I hope this will be the start of some lovely liquid and elastic designs for you, folks! Drop me a line if you have one you want to show off; I love seeing other people&#8217;s great work.</p>
<p class="note"><a href="http://digg.com/design/70_essential_resources_for_creating_liquid_elastic_layouts">Digg</a> this article if you enjoyed it. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/essential-resources-for-creating-liquid-and-elastic-layouts/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Creating sliding composite images</title>
		<link>http://zomigi.com/blog/creating-sliding-composite-images/</link>
		<comments>http://zomigi.com/blog/creating-sliding-composite-images/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 18:00:45 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[liquid]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=101</guid>
		<description><![CDATA[Create the appearance of a single image by layering multiple images on top of each other. The pieces can slide around the page as its width is changed, making it a perfect technique for liquid layouts.]]></description>
			<content:encoded><![CDATA[<p class="note">This tutorial is slightly adapted from Chapter 9 of my book, <a href="http://www.amazon.com/gp/product/0321553845?ie=UTF8&amp;tag=zoeshomepage&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0321553845"><em>Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</em></a>. You can download most of <a href="http://www.flexiblewebbook.com/bonus.html">Chapter 9</a> for free as a PDF at the <a href="http://www.flexiblewebbook.com">Flexible Web Design companion site</a>, as well as download the <a href="http://www.flexiblewebbook.com/files.html">HTML, CSS and image files</a> that go along with this tutorial.</p>
<p>Since the area available for an image to display within a flexible layout changes on the fly, your images may need to as well. While fixed-width images can work within flexible layouts—as long as they’re not too large, or you have matching minimum widths in place—there are lots of ways you can dynamically change the screen area that an image takes up.</p>
<p>I&#8217;ve already written about <a href="http://zomigi.com/blog/foreground-images-that-scale-with-the-layout/">how to make images literally scale</a> and <a href="http://zomigi.com/blog/hiding-and-revealing-portions-of-images/">how to use variable cropping on images</a>. But perhaps you don’t want either end of your image dynamically cropped off—there may be important content on each side that you want to always keep in view. And perhaps you don&#8217;t want to scale the entire image, because although this would keep the entire width of the image always visible, it would also change the vertical space the image takes up, which might not work for your design. This is the perfect time to try using what I call a composite image.<br />
<span id="more-101"></span><br />
Creating what appears to be a single image out of multiple pieces that slide over and away from each other takes a little more work on the graphics side than the variable width image techniques we’ve gone over so far. You can use an unlimited number of images, but we’ll keep it simple and use two for our own alieninvasion example as well.</p>
<p>One image is going to be at least partially overlapping the other, so at least the topmost image needs to have a transparent background. (You may choose to make the lower image transparent too, to allow parts of the main page background to show through, for instance.) You can use either a GIF with index transparency or a PNG with alpha transparency. PNGs are more versatile, since they can lay over any other color or pattern without the skinny colored edge that shows around GIF images when they’re placed over something that’s a different color than they were optimized for. PNGs can also have variable degrees of transparency, instead of each pixel being either 100 percent transparent or 100 percent opaque.</p>
<p>We’ll use an alpha-transparent PNG of a flying saucer for our top image in this example. The flying saucer will be laid on top of a photo of the Chicago skyline, saved as an ordinary JPG.</p>
<p>Once you have your images made, you need two block elements to place each on as a background image. One block element needs to be nested inside the other. In a real page, you’d want to make use of block elements that were already in place as much as possible, such as existing wrapper and header divs. For this simple example, we’ll use two empty divs:</p>
<pre><code>&lt;div id="outer"&gt;&lt;div id="inner"&gt;&lt;/div&gt;&lt;/div&gt;</code></pre>
<p>Next, you need to create rules placing each image as a non-repeating background on each div, with the image you want on the bottom used for the background of the outer div:</p>
<pre><code>#outer {
	background: url(skyline.jpg) no-repeat;
	}
#inner {
	background: url(ufo.png) no-repeat;
}</code></pre>
<p>Since the divs are empty, they also need dimensions added to them to stop them from collapsing entirely, as well as to create the flexible behavior that we want:</p>
<pre><code>#outer {
	<em>width: 100%;</em>
	<em>max-width: 1000px; </em>
	<em>height: 300px;</em>
	background: url(skyline.jpg) no-repeat;
	}
#inner {
	<em>width: 100px;</em>
	<em>height: 250px; </em>
	background: url(ufo.png) no-repeat;
	}</code></pre>
<p>Both of the images now show on the page, with the <a href="http://www.zomigi.com/demo/composite_static.html">flying saucer layered over the skyline</a>. However, the flying saucer never moves when the window changes in size—it’s always pinned to the top left corner of the skyline photo. That’s because the div for which it’s a background begins in that corner, and non-repeating, non-positioned background images display in the top left corner by default.</p>
<p class="sidenote">Note: Remember that IE 6 and earlier do not support alpha-transparent PNGs, so the flying saucer image will have a solid gray background in those browsers. Use the alphaimageloader hack described in the exercise section of Chapter 7 to fix this.</p>
<p>There are a couple ways to fix this: use the background-position property to change where the flying saucer displays within the div, or move the entire div. Either option is fine, but the latter seems a little easier to understand and implement—at least to me—so that’s what we’ll use here. We’ll move the div using absolute positioning; floating would work as well. First, add position: relative; to the #outer rule to make that div act as the containing element for the absolutely positioned inner div. Then, add position: absolute; as well as top and right values to the #inner rule:</p>
<pre><code>#inner {
	<em>position: absolute;</em>
	<em>top: 50px; </em>
	<em>right: 50px;</em>
	width: 100px;
	height: 250px;
	background: url(ufo.png) no-repeat;
	}</code></pre>
<p>Now the flying saucer image will always be 50 pixels away from both the top and right edges of the skyline photo. Because the outer div has a flexible width, its right edge moves as the window is resized, which in turn makes the <a href="http://www.zomigi.com/demo/composite.html">flying saucer image move</a> as well.</p>
<p class="note">Update, June 2009: I&#8217;ve written <a href="http://zomigi.com/blog/css-effect-space-images-out-to-match-text-height/">another tutorial on creating composite images</a> that takes a different approach. Thought you might want to check it out too!</p>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/creating-sliding-composite-images/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hiding and revealing portions of images</title>
		<link>http://zomigi.com/blog/hiding-and-revealing-portions-of-images/</link>
		<comments>http://zomigi.com/blog/hiding-and-revealing-portions-of-images/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 22:25:32 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[liquid]]></category>
		<category><![CDATA[markup]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=90</guid>
		<description><![CDATA[It's possible to dynamically "crop" both background and foreground images as the layout changes in width, solving the problem of overflowing fixed-width images in a flexible page.]]></description>
			<content:encoded><![CDATA[<p class="note">This tutorial is slightly adapted from Chapter 9 of my book, <a href="http://www.amazon.com/gp/product/0321553845?ie=UTF8&amp;tag=zoeshomepage&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0321553845"><em>Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</em></a>. You can download most of <a href="http://www.flexiblewebbook.com/bonus.html">Chapter 9</a> for free as a PDF at the <a href="http://www.flexiblewebbook.com">Flexible Web Design companion site</a>, as well as download the <a href="http://www.flexiblewebbook.com/files.html">HTML, CSS and image files</a> that go along with this tutorial.</p>
<p>Since the area available for an image to display within a flexible layout changes on the fly, your images may need to as well. While fixed-width images can work within flexible layouts—as long as they’re not too large, or you have matching minimum widths in place—there are lots of ways you can dynamically change the screen area that an image takes up.</p>
<p>I&#8217;ve already written about <a href="http://zomigi.com/blog/foreground-images-that-scale-with-the-layout/">how to make images literally scale</a>, but another way to change the amount of screen area an image takes up is to dynamically change how much of the image is shown at any given time. The image itself doesn’t change in size—the amount of space in which it’s allowed to show does, and the rest of the image just remains hidden outside of that space. I call this “variable cropping.”</p>
<p>You can create a variable cropping effect with either background or foreground images. Both look the same, but each is specially suited to different situations.<br />
<span id="more-90"></span></p>
<h3>Variable cropping with background images</h3>
<p>Putting the image that you want to dynamically crop in the background is ideal when the image is purely decorative. This technique lets you keep the image in the CSS with the other decorative images, so if you later change the look of the site, all the decorative images can be changed in a single style sheet instead of having to replace multiple <code>img</code> elements across multiple pages of the site. By keeping the decorative image as a CSS background, you’re also making it likely that the image won’t print when the user prints the page—background printing is turned off by default in all major browsers—so the user can save ink by printing only content.</p>
<p>To use a CSS background image, you’ll fi rst need an element on which to place the background. This example will use a <code>div</code>:</p>
<pre><code>&lt;div id="background"&gt;&lt;/div&gt;</code></pre>
<p>The <code>div</code> is completely empty; it contains no content, but exists simply to hold a background image. If you have a more semantic element you can hang the background on instead, use it. For instance, perhaps the image you want to dynamically crop sits above an <code>h3</code> element and matches it in width. You could add the image as a background to the <code>h3</code> element and give the <code>h3</code> enough top padding to make sure its text sits below the image, not on top of it.</p>
<p>Next, create a rule for this <code>div</code> that sets the image as its non-tiling background:</p>
<pre><code>div#background {
	background: url(styx.jpg) no-repeat;
	border: 2px solid #000;
	}</code></pre>
<p>I’ve added a border on to this <code>div</code> as well so you can easily see where its edges lie. Right now, with no content within the <code>div</code>, it will collapse to zero height. Add dimensions to the <code>div</code> to prop it open:</p>
<pre><code>div#background {
	<em>width: 50%; </em>
	<em>height: 330px;</em>
	background: url(styx.jpg) no-repeat;
	border: 2px solid #000;
	}</code></pre>
<p class="tip">Tip: To dynamically change the height of the image as well as or instead of the width, use a flexible value for the <code>height</code> property.</p>
<p>The width is set to some flexible dimension—either a percentage, as I’ve done here, or an em value to make it elastic—so that the <code>div</code> can change in width to show more or less of the image. The height is set to the pixel height of the image so that the entire height of the image will show at all times.</p>
<p>The <code>div</code> will now always be 50 percent as wide as the viewport; its background image doesn’t change in size, but gets <a href="http://www.zomigi.com/demo/crop_background_right.html">cropped to a varying degree from the right side</a>.</p>
<p>However, this particular image would look better cropped from the left side, as the cat’s face is on the right side of the photo. To specify from where the image gets cropped, use the <code>background-position</code> property, or its shorthand in the <code>background</code> property, to change the alignment of the image within the <code>div</code>:</p>
<pre><code>div#background {
	width: 50%;
	height: 330px;
	background: url(styx.jpg) no-repeat <em>right</em>;
	border: 2px solid #000;
	}</code></pre>
<p>The image is now anchored to the right side of the <code>div</code>, so <a href="http://www.zomigi.com/demo/crop_background.html">more or less of its left side shows as the <code>div</code> changes in size</a>.</p>
<p>This is all the CSS necessary to get the basic variable cropping technique working, but you can add a few other enhancements if you like. For instance, right now, once the <code>div</code> exceeds the width of the image, empty white space shows within the <code>div</code>. There are a few ways you could handle this. You could add a background color to the <code>div</code> as well that would fill up whatever space the image cannot; if you blend the edge of the image into this background color, the effect can look seamless. Or, you could add a maximum width to the <code>div</code> so it can never grow larger than the image. You could also add minimum widths, as well as maximum and minimum heights, to ensure that the <code>div</code> can never grow or shrink past particular<br />
points in the image.</p>
<h3>Variable cropping with foreground images</h3>
<p>If the image that you want to dynamically crop is functional content, you’ll want to keep it as a foreground image by placing it in the (X)HTML using the <code>img</code> element. You can ask yourself these questions to determine if the image is content, not decoration:</p>
<ul>
<li>Does the image convey information that I ought to put as text in an <code>alt</code> attribute?</li>
<li>Do I want to make sure the image always prints because without it the<br />
printout wouldn’t make sense or be complete?</li>
<li>Do I want to link the image?</li>
</ul>
<p>If the answer to any of these questions is yes, the image is content and should be kept in the (X)HTML. CSS background images can’t achieve any of these goals—at least not without some complicated workarounds and hacks, all of which are quite silly, considering how easily a simple <code>img</code> element can achieve all this.</p>
<p>As with the background-image version of the variable cropping technique, you’ll need some block element in the (X)HTML to hold the image. We’ll use a <code>div</code> again; this time it won’t be empty, but will instead contain the img element:</p>
<pre><code>&lt;div id="foreground"&gt;
	&lt;img src="styx.jpg" alt="my cat Styx" width="500" height="330"&gt;
&lt;/div&gt;</code></pre>
<p class="sidenote">Note: The <code>img</code> element has an <code>alt</code> attribute providing the text equivalent of the image. You can’t do this with a CSS background image.</p>
<p>Just as before, the <code>div</code> needs to have a flexible width and a height set to the pixel height of the image:</p>
<pre><code>div#foreground {
	width: 50%;
	height: 330px;
	border: 2px solid #000;
	}</code></pre>
<p>So far, all we have is a regular <code>div</code> holding a regular image—there’s nothing yet that makes this a variable cropping technique. If the image is bigger than the <code>div</code>, it doesn’t get cropped, but simply <a href="http://www.zomigi.com/demo/crop_foreground_overflow.html">overflows</a>.</p>
<p>To get the cropping effect, add <code>overflow: hidden;</code> to the CSS rule:</p>
<pre><code>div#foreground {
	<em>overflow: hidden; </em>
	width: 50%;
	height: 330px;
	border: 2px solid #000;
	}</code></pre>
<p>Now whatever portion of the image would overflow out of the <code>div</code> is <a href="http://www.zomigi.com/demo/crop_foreground_right.html">hidden from view</a>.</p>
<p>Once again, though, it would be better for this image to be cropped from the left side, not the right. We can’t use the <code>background-position</code> property this time because it’s not a background image. To change how a foreground image is anchored within its parent, you can float the image:</p>
<pre><code>div#foreground img {
	float: right;
	}</code></pre>
<p>This anchors the image to the right side of the <code>div</code>, so <a href="http://www.zomigi.com/demo/crop_foreground.html">more or less of its left side shows as the <code>div</code> changes in size</a>. Using a foreground image results in an effect that <a href="http://www.zomigi.com/demo/crop.html">looks exactly like using a background image</a>, but the foreground image has alternative text, and you could also easily add a link to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/hiding-and-revealing-portions-of-images/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Foreground images that scale with the layout</title>
		<link>http://zomigi.com/blog/foreground-images-that-scale-with-the-layout/</link>
		<comments>http://zomigi.com/blog/foreground-images-that-scale-with-the-layout/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 21:44:34 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[liquid]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=58</guid>
		<description><![CDATA[Simple CSS techniques can make the content images inside your liquid or elastic pages scale with the layout.]]></description>
			<content:encoded><![CDATA[<p class="note">This tutorial is slightly adapted from Chapter 9 of my book, <a href="http://www.amazon.com/gp/product/0321553845?ie=UTF8&amp;tag=zoeshomepage&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0321553845"><em>Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</em></a>. You can download most of <a href="http://www.flexiblewebbook.com/bonus.html">Chapter 9</a> for free as a PDF at the <a href="http://www.flexiblewebbook.com">Flexible Web Design companion site</a>, as well as download the <a href="http://www.flexiblewebbook.com/files.html">HTML, CSS and image files</a> that go along with this tutorial.</p>
<p>Since the area available for an image to display within a flexible layout changes on the fly, your images may need to as well. While fixed-width images can work within flexible layouts—as long as they’re not too large, or you have matching minimum widths in place—there are lots of ways you can dynamically change the screen area that an image takes up.</p>
<p>One way to dynamically alter the footprint of an image is to make it literally scale, based on either the text size or the changing dimensions of its parent element. Both are elegant effects that are deceptively simple to create.<br />
<span id="more-58"></span><br />
Both liquid and elastic scaling images start out with a regular <code>img</code> element in the (X)HTML:</p>
<pre><code>&lt;img src="styx.jpg" alt="my cat Styx"&gt;</code></pre>
<p>Notice that this <code>img</code> element has no <code>width</code> or <code>height</code> attributes, as it normally would. You control the dimensions with CSS instead.</p>
<p>For a liquid image, create a CSS rule to set the image’s width to a percentage value:</p>
<pre><code>img {
  	width: 50%;
  	}</code></pre>
<p class="sidenote">Note: This rule will make all images 50 percent as wide as their parents. In a real page, you would probably add an <code>id</code> or <code>class</code> to the specific image you wanted to scale and use that <code>id</code> or <code>class</code> as the selector in the CSS.</p>
<p>No <code>height</code> value is necessary; the browser determines the height that will proportionately constrain the image’s dimensions. If you were more concerned about making the height of your image stay proportional to its parent’s height than you were with width, you could use the <code>height</code> property in the CSS and leave off the <code>width</code> property. Just make sure not to use the two together.</p>
<p>As with all percentage dimensions, the percentage <code>width</code> value you choose is relative to the width of the parent element. As you change the width of the parent element, the <a href="http://www.zomigi.com/demo/scale_liquid.html">image scales to match</a>.</p>
<p>If you want the image to <a href="http://www.zomigi.com/demo/scale_elastic.html">scale with the text size</a> instead of the width of the parent element, simply change the <code>width</code> value in the CSS to an em value:</p>
<pre><code>img {
  	width: 20em;
  	}</code></pre>
<p>Any time a browser scales an image, there’s going to be some distortion, but you can keep it minimal by starting out with a very large image so the browser will usually be scaling it down.</p>
<p>To assure that the browser <em>always</em> scales the image down, not up, you can set a maximum width on the image that matches its set pixel width:</p>
<pre><code>img {
  	width: 20em;
  	<em>max-width: 500px;</em>
  	}</code></pre>
<p class="tip">Tip: If the image must stay above a certain size to remain “readable,” add a pixel <code>min-width</code> value too.</p>
<p>Now the image will scale <a href="http://www.zomigi.com/demo/scale_elastic_max.html">only until it grows to 500 pixels wide</a>; thereafter it will act as any other fixed-width image.</p>
<h3>Simulate image scaling with JavaScript</h3>
<p>If you don’t want the browser to scale your images at all, yet you want them to change in size based on the amount of space available, you can use JavaScript to swap in differently sized versions of the same image. The JavaScript detects the user’s viewport size and chooses the appropriate version of the image to show. This works in the same way that <a href="http://www.clagnut.com/blog/1663/">resolution-dependent layouts</a> swap in different CSS files based on viewport size.</p>
<p>A live site that uses image-swapping to simulate scaling is <a href="http://www.artlogic.com/">Art &amp; Logic</a>. There are four illustrations under the banner on the home page. Try narrowing or widening your browser window; the images don’t scale in real time in most browsers, but as soon as you stop moving the window, they jump to a different size to match the available new space.</p>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/foreground-images-that-scale-with-the-layout/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flexible Web Design is out</title>
		<link>http://zomigi.com/blog/flexible-web-design-is-out/</link>
		<comments>http://zomigi.com/blog/flexible-web-design-is-out/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 19:11:34 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[Flexible Web Design]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=19</guid>
		<description><![CDATA[My book, Flexible Web Design: Creating Liquid and Elastic Layouts with CSS, is now out, and its companion site is up.]]></description>
			<content:encoded><![CDATA[<p>My book, <a href="http://www.amazon.com/gp/product/0321553845?ie=UTF8&amp;tag=zoeshomepage&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0321553845">Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</a>, is now out! It doesn&#8217;t appear to be in brick-and-mortar bookstores yet, but you can buy it online.</p>
<p>If you want to learn more about the book, check out the <a href="http://www.flexiblewebbook.com">Flexible Web Design companion site</a>. You can download the example and exercise files from the book as well as some sample content.</p>
<p>(By the way, I&#8217;m having my first baby any day now, so please be patient with me regarding site updates and responses to email. I&#8217;ll be back to the world of the living soon enough!)</p>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/flexible-web-design-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Living, breathing design comps</title>
		<link>http://zomigi.com/blog/living-breathing-design-comps/</link>
		<comments>http://zomigi.com/blog/living-breathing-design-comps/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 19:51:31 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[liquid]]></category>
		<category><![CDATA[work process]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=17</guid>
		<description><![CDATA[Presenting static image comps to clients can be especially problematic if you create flexible layouts. Try building an (X)HTML/CSS version of the design to show to your client instead in order to make designing and creating flexible layouts easier.]]></description>
			<content:encoded><![CDATA[<p>In my book <a href="http://www.amazon.com/Flexible-Web-Design-Creating-Elastic/dp/0321553845">Flexible Web Design</a>, I give lots of reasons why liquid/elastic layouts make sense. While this will hopefully convince you, the designer, to give them a try, it&#8217;s not necessarily going to convince your client that a flexible layout is acceptable for his or her own site—especially if you present comps to your client as static images created in Fireworks or Photoshop. Andy Clarke makes a great <a href="http://forabeautifulweb.com/blog/about/time_to_stop_showing_clients_static_design_visuals/">argument against presenting clients static design comp images</a> because they set up expectations in the client&#8217;s mind that the design is always going to look exactly that way, instead of varying based on the user&#8217;s browser, text size, installed fonts, monitor colors, etc.</p>
<p>While Andy&#8217;s proposal doesn&#8217;t just pertain to the design process for flexible sites—he seems to advocate it for all types of sites—Andy does ask:</p>
<blockquote><p>Is the fact that so many web pages are fixed width and centered a direct result of clients signing off fixed width design visuals?</p></blockquote>
<p>I&#8217;m willing to answer yes to that question. Not that this is the only reason fixed-width designs get created, but I&#8217;m sure it plays a role in many of them. As I talk a great deal about in my book, as well as the <a href="http://zomigi.com/blog/revised-presentation-slides-available/">presentation</a> I&#8217;ve made at a couple conferences lately, you can&#8217;t build a flexible page unless you&#8217;ve designed it to be flexible in the first place. You may design a page that must be fixed-width inadvertently, and won&#8217;t catch it until you go to build the page in (X)HTML and CSS. But if your client already signed off on the design when it was a static image, it&#8217;s now too late to change the design to make it liquid-compatible. Forcing yourself to build at least a rough version of the page before you present the design to the client is a great way of checking if your design is truly flexible-friendly. If you find that it isn&#8217;t, you can make design changes to avoid CSS headaches later.</p>
<p>A lot of the commentary surrounding Andy&#8217;s proposal has been that building pages for clients will take a lot more time that isn&#8217;t in the budget. I think this is a valid argument. But, I also agree with the arguments that this workflow method can actually be a time-saver—or at least that the extra time spent making the (X)HTML/CSS comp can be made up later. Andy says:</p>
<blockquote><p>As I work almost as fast in markup and CSS as I do in Fireworks, I find that the overall time that I take designing and implementing that design is dramatically reduced as I am not duplicating work. It leaves me free to spend more time on fine tuning a design and I&#8217;m sure that my designs are all the better for that.</p></blockquote>
<p>I&#8217;m right with Andy on this one. I&#8217;ll spend a lot of time futzing with the perfect border color or the perfect amount of spacing under a heading; when it comes time to build the page, I&#8217;ll have to do all that futzing over again in the CSS to find the perfect em measurement, for example, that matches the spacing I created in the Fireworks comp. It&#8217;s often faster for me to just leave all the work on these design details to my CSS development stage.</p>
<p>Another argument for time-saving comes from <a href="http://www.mindfly.com/blog/post/2008/09/A-Modest-Proposal-CSS-Not-Cannibalism.aspx">Kyle Weem&#8217;s response</a> to Andy&#8217;s original post:</p>
<blockquote><p>&#8230;you can absorb that extra time spent in the budget that <em>would have been wasted</em> on extravagant solutions generated to create identical rendering where it need not exist.</p></blockquote>
<p>Another argument I totally agree with, especially if you are trying to create flexible designs. When you build the (X)HTML/CSS before showing to the client, you catch things in your design that are going to be tough and time-consuming to build—either because you&#8217;ve designed them in such a way that you can&#8217;t make things flexible, or it&#8217;s just going to take a lot of hacking to get it looking the same cross-browser.</p>
<p>All this said, this method of showing (X)HTML/CSS pages to clients instead of static design comps is not something I&#8217;ve actually done (though I do sometimes show wireframes before design comps). But as someone who primarily designs liquid layouts now, I can see it being really beneficial to the way I work, and I&#8217;m definitely going to give it a try soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/living-breathing-design-comps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
