<?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>Kyle Schaeffer - Interactive Media Design &#187; Design</title>
	<atom:link href="http://kyleschaeffer.com/tag/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://kyleschaeffer.com</link>
	<description>Veteran web designer Kyle Schaeffer brings you tips, tricks, and best practices in interactive media design.</description>
	<lastBuildDate>Thu, 15 Jul 2010 21:26:55 +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>Designing Body Type</title>
		<link>http://kyleschaeffer.com/best-practices/designing-body-type/</link>
		<comments>http://kyleschaeffer.com/best-practices/designing-body-type/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 21:26:55 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Text]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=612</guid>
		<description><![CDATA[Header text gets all the love, doesn&#8217;t it? From Photoshop to the browser window, the focus seems to be on design elements like logos, navigation, and of course, header type. It&#8217;s great fun to use tools like Typekit to make your header text something a little less than ordinary. It defines your site, gives you [...]]]></description>
			<content:encoded><![CDATA[<p>Header text gets all the love, doesn&#8217;t it? From Photoshop to the browser window, the focus seems to be on design elements like logos, navigation, and of course, header type. It&#8217;s great fun to use tools like <a href="http://typekit.com">Typekit</a> to make your header text something a little less than ordinary. It defines your site, gives you a unique look and feel, and gives readers that oh-so-scannable sensation they know and love. When you really think about it, however, readers aren&#8217;t there for the header text. The headers serve as an essential tool to quickly find what you&#8217;re looking for, but the real prize here is the body text, isn&#8217;t it? This is where your information is, this is where you write and communicate to readers, and this is an area of design that cannot be neglected. Sadly, it often is.<span id="more-612"></span></p>
<p>Body text is often an after-thought in design. We have all been guilty of this at some point in our careers. When you implement your CSS, you might simply throw a <code>body { font-family: blah, blah blah; }</code> into the CSS, and after that you move on. You&#8217;ve probably figured out the whole base font size <em>thing</em> too, which can help, but there&#8217;s so much more you can do. Let&#8217;s look at a number of things to help your body type become something a bit more visually appealing and readable.</p>
<h3>Text Color</h3>
<p>Hopefully you&#8217;ve already figured this one out, but I dare not exclude it for the sake of accuracy. Probably the single most important thing you can do to your body text is change both the color of the text as well as the background color of the area shown behind the text. Here&#8217;s a few pointers:</p>
<ul>
<li>Readers generally prefer dark text on a light background. There are a few impressive exceptions to this rule, but for the most part, it&#8217;s best to stick with the old &#8220;dark on light&#8221; tried-and-true formula.</li>
<li>While contrast is important, don&#8217;t take it too far. Black text (<code>#000000</code>) on a white background (<code>#ffffff</code>) is perhaps a bit too much contrast. Opting for a slightly lighter shade of text can make it easier on your readers&#8217; eyes. If I&#8217;m working on a white background, I generally choose a font color that is at or in the general vicinity of <code>#666666</code> (don&#8217;t be afraid to add a subtle hue of color too, but keep it dark).</li>
<li>Add some variety by slightly changing the color of elements in your body text like darker <code>&lt;strong&gt;</code> text or lighter <code>&lt;li&gt;</code> items. You don&#8217;t have to stick with a single color for all text in the entire design.</li>
<li>Keep the focus on your article or body text. If you have a sidebar or widgets that appear to the side of your actual body text, try lightening their text color (or reducing contrast with a different background color) to make sure that users focus on the real content of the page.</li>
</ul>
<h3>Font Size</h3>
<p>Another obvious and quite important element of your body text style is the font size. There are <a href="http://www.kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/">a number of different ways</a> to establish a default font size for your text. While the method of setting your font sizes is a matter of debate, there are a few best practices you should be aware of.</p>
<ul>
<li>It&#8217;s easiest on your users to set the <code>body</code> font size at <code>62.5%</code>, and use <code>ems</code> to size your fonts from there (<code>.wrapper { font-size: 1.3em; }</code> would set the font size to 13 pixels in height).</li>
<li>Choose a base font size of at least 12 pixels in height. There are exceptions to every rule, but you&#8217;ll find that users are frustrated by tiny font sizes, and are apt to leave a site even before using the handy browser zoom feature.</li>
<li>Deviate from the base font size only where it makes sense in the overall theme of the design. Consistency is key. Set default CSS styles for things like the <code>&lt;small&gt;</code> tag and headers.</li>
</ul>
<h3>Font Family</h3>
<p>Fonts are a bit tricky in web design, basically because you&#8217;re forced to choose one of about ten fonts that are used on every other website in the world. <a href="http://typekit.com">Typekit</a> is great for header text, but you&#8217;re better off using regular web-friendly fonts for your body text. Here&#8217;s a few pointers:</p>
<ul>
<li><strong>Serif vs. Sans-Serif:</strong> First choose the font style you&#8217;ll be working with. Choose something that fits with your design&#8217;s overall theme or concept. Serif fonts like Times and Georgia give your site a vintage and book-like feel. They are flowing, artistic, and regal in theme. Sans-serif fonts like Arial or Helvetica can be used to portray a clean, professional, and strong atmosphere in your design.</li>
<li>Choose a <a href="http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html" target="_blank">common font</a> for your body text that is available on both Mac and PC platforms. There are some great fonts on the Mac, but you&#8217;ll want to design your site so that it looks good no matter what device is accessing it.</li>
<li>It&#8217;s completely acceptable to add a &#8220;nice to have&#8221; font into your design, such as Helvetica or Myriad Pro. These fonts can gracefully degrade to Arial without jarring the layout of your page too much.</li>
<li>Georgia and Times are not the only serif fonts available! Try experimenting with fonts like Book Antiqua or Platino Linotype, which have a more book-like and artistic feel.</li>
<li>Courier New is a great fixed-width font best used for displaying CSS, HTML, or some kind of code to your readers.</li>
<li>Don&#8217;t forget other elements in your design! By default, text boxes, buttons, and select menus will not use the body font family and/or size, so make sure to set a consistent font on all elements in your design.</li>
<li>Don&#8217;t use Comic Sans.</li>
</ul>
<h3>Margin, Spacing, and Line Height</h3>
<p>This is probably the most overlooked element of body type design. After you&#8217;ve developed the <strong>character</strong> design of your body type, take a step back and examine the <strong>paragraph</strong> style.</p>
<ul>
<li>Unless you specify otherwise, the lines of text in your design are drawn very close together, and it can be difficult for readers to follow as they read down the page. Add a bit of CSS such as <code>p { line-height: 1.5em; }</code> to make this text easier on the eyes.</li>
<li>Likewise, paragraphs of text have default margins applied to them that may make them appear too close together or too far away from the headers that appear above them. Try adding some CSS such as <code>p { margin: 0 0 1.5em 0; }</code> to standardize the spacing around paragraphs.</li>
<li>Paragraph text is not the only thing you&#8217;ll see in a page. Don&#8217;t forget to style other HTML elements like lists (<code>&lt;ul&gt;</code> or <code>&lt;ol&gt;</code>), the horizontal rule (<code>&lt;hr /&gt;</code>), and block quotes or call-out boxes.</li>
</ul>
<h3>Be Creative</h3>
<p>Following these rules isn&#8217;t a guaranteed way to make your body type look amazing, and breaking any or all of these rules certainly doesn&#8217;t guarantee that your design will be ugly and fail. In the end, it&#8217;s all about being creative and paying attention to all the tiny details that go into making a website look amazing. The difference between a good design and a bad one can be very subtle. Create something fun, stick to a theme, and take note of every visual detail that appears on the page, body type included.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/best-practices/designing-body-type/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Announcing ThePeev.com</title>
		<link>http://kyleschaeffer.com/personal/announcing-thepeev/</link>
		<comments>http://kyleschaeffer.com/personal/announcing-thepeev/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 19:40:34 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=474</guid>
		<description><![CDATA[I am pleased to announce the launch of my latest project, ThePeev.com. The Peev is a quick and dirty WordPress site designed for the sole purpose of serving as my personal artistic outlet. I&#8217;m posting doodles and sketches regarding all the things in life that may or may not bother you. I had a lot [...]]]></description>
			<content:encoded><![CDATA[<p>I am pleased to announce the launch of my latest project, <a href="http://thepeev.com/">ThePeev.com</a>. The Peev is a quick and dirty WordPress site designed for the sole purpose of serving as my personal artistic outlet. I&#8217;m posting doodles and sketches regarding all the things in life that may or may not bother you. I had a lot of fun creating the site, which came together nicely from concept to complete in less than eight hours of work. What&#8217;s your pet peeve? Visit <a href="http://thepeev.com/">ThePeev.com</a> and let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/personal/announcing-thepeev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Buttons and Accessibility</title>
		<link>http://kyleschaeffer.com/best-practices/image-buttons-and-accessibility/</link>
		<comments>http://kyleschaeffer.com/best-practices/image-buttons-and-accessibility/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 21:29:32 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Text]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=358</guid>
		<description><![CDATA[Image buttons are a fairly common occurrence in web media. As with everything else in web design, you have a dizzying arsenal of methods from which you can choose to create this type of design element, and choosing the right method can greatly aid in your design&#8217;s accessibility, performance, and SEO-friendliness. Concerning Accessibility Accessibility is [...]]]></description>
			<content:encoded><![CDATA[<p>Image buttons are a fairly common occurrence in web media. As with everything else in web design, you have a dizzying arsenal of methods from which you can choose to create this type of design element, and choosing the right method can greatly aid in your design&#8217;s accessibility, performance, and SEO-friendliness.<span id="more-358"></span></p>
<h3>Concerning Accessibility</h3>
<p>Accessibility is chiefly important for a web designer (or at least, it should be). When you create your HTML, keep things as simple as possible. Assume that every single user who visits your site will (1) not have CSS support, (2) will disable all images on your page, and (3) will not have JavaScript enabled. If you design your HTML in this fashion, you&#8217;ll find that creating accessible content is much easier to do. Once you have an accessible document that works on all systems, you can use the fantastic features of CSS and client-side scripting to really bring your site to life. These &#8220;nice to have&#8221; features (style, scripting, etc.) are not essential to the structure of your document or the content that&#8217;s contained within. When it comes down to it, users are after your content, so that&#8217;s priority number one.</p>
<h3>A Simple Example</h3>
<p>With that in mind, let&#8217;s say we wanted to create an image that links to another page (this is so very simple, but it serves as a great example of this technique). Because we&#8217;re assuming that users have disabled all images, we certainly don&#8217;t want to use the <code>&lt;img/&gt;</code> tag for our link, because those users without image support simply won&#8217;t see it. For that reason, our link will look like any other link on the site.</p>
<pre>&lt;a class="learnGuitar" href="http://www.mahalo.com/how-to-play-guitar-for-newbies"&gt;Learn Guitar&lt;/a&gt;</pre>
<p>I know&#8230;this is really simple, but stay with me; I promise we&#8217;re going somewhere with this. Our very simple HTML has passed our criteria:  users with CSS disabled will see the link, as will users without images or script. It&#8217;s very simply an accessible link on our page, read as easily by normal users as it is by search engines or even people using screen readers. Next, for users who can utilize our &#8220;nice to have&#8221; features, we&#8217;ll add a bit of CSS to make our image appear.</p>
<pre>.learnGuitar {
	display: block;
	width: 200px;
	height: 50px;
	background: url('/path/to/learn-guitar.png');
	text-indent: -9999em;
}</pre>
<p>As you can see, we&#8217;re using the <code>text-indent</code> CSS property to bump our text out of the way, and in it&#8217;s place, we&#8217;re using <code>background</code> to set an image for our link. All you have to do for your own image is adjust the width, height, and background URL to match. What you get when you&#8217;re all done is this:</p>
<style type="text/css">.learnGuitar{display: block;width: 200px;height: 50px;background: url('http://kyleschaeffer.com/wordpress/wp-content/uploads/2009/11/learn-guitar.png');text-indent: -9999em;}.learnGuitar:hover{border-style: none;background-color: transparent;}</style>
<p><a class="learnGuitar" href="http://www.mahalo.com/how-to-play-guitar-for-newbies">Learn Guitar</a></p>
<h3>Adding a Hover Image</h3>
<p>Easy and accessible CSS image replacement! It looks great, but let&#8217;s take it one more level to really make sure users know that our button DESERVES to be clicked. Let&#8217;s add a hover style. I&#8217;m going to use an image &#8220;sprite&#8221; for the hover image, which means that both our static and hover states are contained within the same image. Here&#8217;s my *single* image that&#8217;s used for this type of style:</p>
<p><img src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2009/11/learn-guitar-hover.png" alt="Learn Guitar Image Sprite" title="Image sprite - note that both button states are contained within the same image!" width="200" height="100" /></p>
<p>We&#8217;ll adjust our CSS to account for our new hover image. Note that the <code>height</code> and <code>width</code> attributes will not change! The hover-state image will be &#8220;clipped,&#8221; so that it&#8217;s only visible when users move their mouse cursor over our image button.</p>
<pre>.learnGuitar {
	display: block;
	width: 200px;
	height: 50px;
	background: url('/path/to/learn-guitar.png') top;
	text-indent: -9999em;
}
.learnGuitar:hover {
	background-position: 0 -50px;
}</pre>
<p>Now, when users move their mouse cursor over our image button, the CSS will &#8220;slide&#8221; the background image so that the hover state is displayed instead of the static state.</p>
<style type="text/css">.learnGuitarHover{display: block;width: 200px;height: 50px;background: url('http://kyleschaeffer.com/wordpress/wp-content/uploads/2009/11/learn-guitar-hover.png') top;text-indent: -9999em;}.learnGuitarHover:hover{background-position: 0 -50px;border-style: none;background-color:transparent;}</style>
<p><a class="learnGuitarHover" href="http://www.mahalo.com/how-to-play-guitar-for-newbies">Learn Guitar</a></p>
<p>Crafting your image buttons in this fashion can really save on performance and download times. Perhaps more importantly, your site will be much more &#8220;friendly&#8221; to visually impaired users using screen readers, and you&#8217;ll find that search engines will have an easier time understanding what your links and other content are all about.</p>
<p>Let me know if you have any questions or comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/best-practices/image-buttons-and-accessibility/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reusable Transparent CSS Rounded Corners</title>
		<link>http://kyleschaeffer.com/best-practices/reusable-transparent-css-rounded-corners/</link>
		<comments>http://kyleschaeffer.com/best-practices/reusable-transparent-css-rounded-corners/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 21:45:09 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Corners]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=296</guid>
		<description><![CDATA[In retrospective, there are definitely some areas where I could have improved on my Karate Corners design. I decided to take a second look and write a quick post that details how I create corners today, after almost a year of evolution in the ever-changing world of web design. This is absolutely the most simple [...]]]></description>
			<content:encoded><![CDATA[<p>In retrospective, there are definitely some areas where I could have improved on my <a href="http://www.kyleschaeffer.com/tutorials/karate-corners-easy-rounded-corners-xhtml-no-script/">Karate Corners</a> design. I decided to take a second look and write a quick post that details how I create corners today, after almost a year of evolution in the ever-changing world of web design. This is absolutely the most simple and efficient way to create rounded corners using strictly CSS and HTML.<span id="more-296"></span></p>
<p>Rounded corners are all the rage; they have been for some time now. There are <a href="http://www.kyleschaeffer.com/best-practices/rounded-corners-in-mozilla-and-safari/">pure CSS</a> approaches to implementing this type of design, but occasionally your clients demand that your user experience be consistent across all browsers. Whether it&#8217;s time to stop using HTML and images for rounded corners is still a <a href="http://www.kyleschaeffer.com/best-practices/a-whole-new-web/">matter of debate</a>. Nonetheless, I think every designer finds themselves doing this from time to time.</p>
<h3>Say No to Images</h3>
<p>I&#8217;ve found that many designs contain various types of rounded box styles on the same page. In my previous tutorial, this would demand that you create a separate corner image for each style of box. If you have a box with a red background, you&#8217;ll need to create a corner image with red corners. That makes sense from a visual perspective. From a data perspective, however, it&#8217;s not the best approach. If you think about it, the only thing you&#8217;re really &#8220;downloading&#8221; when you download a corner image is the curvature of your box&#8217;s edge. Wouldn&#8217;t it be better if we could somehow reuse that data on every box style everywhere else in your design?</p>
<p>Well, you can! How gloriously fantastic! Well&#8230;don&#8217;t get all excited just yet. There are a few limitations to this. <strong>This will only work when your rounded box appears on a solid color.</strong> For instance, the text you&#8217;re reading right now is on a solid white background. We can easily add rounded boxes to this page because of the solid color. This doesn&#8217;t really work if your background is an image or a gradient color.</p>
<h3>Meet the Sprite</h3>
<p>So, you have a solid background color, and you&#8217;re ready to add some rounded corner boxes to your page. The only really important thing here is your corners image. In Photoshop or an image editing software of your choice, create a square image. Basically, your image is all four box corners stuck together, so make it symmetrical. Fill your image with the background color of your page, and then delete a circle out of the middle of the square. It&#8217;s that easy! Here&#8217;s what it should look like when you&#8217;re done:</p>
<p><img src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2009/09/TransparentCorners.png" alt="Transparent Corners Image" /></p>
<p>In case you&#8217;re not Photoshop-savvy, I have created a few templates that you can download and use.</p>
<ul>
<li><a href="http://www.kyleschaeffer.com/wp-content/uploads/2009/09/TransparentCorners-10.psd">TransparentCorners-10.psd</a> &#8211; 10&#215;10 pixel corner image template</li>
<li><a href="http://www.kyleschaeffer.com/wp-content/uploads/2009/09/TransparentCorners-15.psd">TransparentCorners-15.psd</a> &#8211; 15&#215;15 pixel corner image template</li>
<li><a href="http://www.kyleschaeffer.com/wp-content/uploads/2009/09/TransparentCorners-20.psd">TransparentCorners-20.psd</a> &#8211; 20&#215;20 pixel corner image template</li>
</ul>
<h3>The Markup</h3>
<p>Now that we have this nice fancy reusable transparent corner image, it&#8217;s time to create the HTML that will be used to house our beautiful box and its contents. Here&#8217;s the basic setup:</p>
<pre>&lt;div class=&quot;box red&quot;&gt;
	&lt;div class=&quot;corner TL&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner TR&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner BL&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner BR&quot;&gt;&lt;/div&gt;
	&lt;p&gt;This is your box content. Lorem ipsum dolor sit amet.&lt;/p&gt;
&lt;/div&gt;</pre>
<p>Pretty simple, right? We have an outer &#8220;box&#8221; <code>&lt;div/&gt;</code>, a <code>&lt;div/&gt;</code> for each corner, and then our content that will appear inside the box.</p>
<h3>The Style</h3>
<p>Our HTML doesn&#8217;t do much by itself. Most of the work to be done is going to be done in our CSS style sheet. In an attached style sheet, add the following CSS:</p>
<pre>.box {
	position: relative;
	padding: 1em;
}
.red {
	background: #cc0000;
	color: #fff;
}
.corner {
	position: absolute;
	width: 10px;
	height: 10px;
	background: url(/path/to/cornerImage.png) no-repeat;
}
.TL {
	top: 0;
	left: 0;
	background-position: 0 0;
}
.TR {
	top: 0;
	right: 0;
	background-position: 100% 0;
}
.BL {
	bottom: 0;
	left: 0;
	background-position: 0 100%;
}
.BR {
	bottom: 0;
	right: 0;
	background-position: 100% 100%;
}</pre>
<p>As you can see, we&#8217;re really trying to keep this simple. Basically, we have an outer &#8220;box&#8221; style, a &#8220;red&#8221; style that sets the box&#8217;s background color to red, and finally individual &#8220;corner&#8221; styles that will automatically position themselves at the edges of our content, regardless of the height/width of that content. Groovy.</p>
<h3>The Result</h3>
<p>I&#8217;ve created a simple &#8220;white&#8221; background corner image for use on this page. What you get when you put all of this together is a very flexible corner system that requires very little HTML and CSS to implement:</p>
<style type="text/css">.box { position: relative; padding: 1em; margin: 0 0 1em 0; }
.red { background: #cc0000; color: #fff; }
.corner { position: absolute; width: 20px; height: 20px; background: url(/wp-content/uploads/2009/09/cornerWhite.png) no-repeat; }
.TL { top: 0; left: 0; background-position: 0 0; }
.TR { top: 0; right: 0; background-position: 100% 0; }
.BL { bottom: 0; left: 0; background-position: 0 100%; }
.BR { bottom: 0; right: 0; background-position: 100% 100%; }</style>
<div class="box red">
<div class="corner TL"></div>
<div class="corner TR"></div>
<div class="corner BL"></div>
<div class="corner BR"></div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque justo felis, molestie rutrum blandit vitae, pellentesque vitae risus. Nunc hendrerit eleifend lectus. Aenean interdum facilisis sem eget laoreet. Morbi in nisl nec neque auctor volutpat. Nam sodales felis id magna cursus ac pretium libero mollis.</p>
</div>
<p>And the coolest part&#8230;</p>
<h3>It&#8217;s Reusable!</h3>
<p>The coolest part about using transparent images for our corners is that we can apply these corners to just about anything on our page that we want to. For instance, I could create some additional box styles (other than &#8220;red&#8221;) by adding a bit of CSS.</p>
<pre>.red {
	background: #cc0000;
	color: #fff;
}
.blue {
	background: #00cc00;
	color: #fff;
}
.green {
	background: #0000cc;
	color: #fff;
}
.gray {
	background: #dedede;
	color: #666;
}</pre>
<p>After changing our box&#8217;s class (<code>class="box blue"</code>, <code>class="box green"</code>, etc.), we would get:</p>
<style type="text/css">.blue { background: #00cc00; color: #fff; }
.green { background: #0000cc; color: #fff; }
.gray { background: #dedede; color: #666; }
.oneThird { float: left; width: 31.3%; margin: 0 2% 0 0; }
.oneThirdBottom { clear: both; }</style>
<div class="oneThird">
<div class="box red">
<div class="corner TL"></div>
<div class="corner TR"></div>
<div class="corner BL"></div>
<div class="corner BR"></div>
<p>Suspendisse potenti. Morbi eget turpis urna. Fusce tincidunt sem mollis lacus euismod rhoncus sagittis est placerat.</p>
</p></div>
</div>
<div class="oneThird">
<div class="box blue">
<div class="corner TL"></div>
<div class="corner TR"></div>
<div class="corner BL"></div>
<div class="corner BR"></div>
<p>Suspendisse potenti. Morbi eget turpis urna. Fusce tincidunt sem mollis lacus euismod rhoncus sagittis est placerat.</p>
</p></div>
</div>
<div class="oneThird">
<div class="box green">
<div class="corner TL"></div>
<div class="corner TR"></div>
<div class="corner BL"></div>
<div class="corner BR"></div>
<p>Suspendisse potenti. Morbi eget turpis urna. Fusce tincidunt sem mollis lacus euismod rhoncus sagittis est placerat.</p>
</p></div>
</div>
<div class="oneThirdBottom"></div>
<div class="box gray">
<div class="corner TL"></div>
<div class="corner TR"></div>
<div class="corner BL"></div>
<div class="corner BR"></div>
<p>Gray is the new &#8220;red&#8221;. Vestibulum iaculis varius laoreet. Ut et condimentum nunc. Suspendisse eleifend congue dolor, non consequat ante tristique sit amet.</p>
</div>
<p>That&#8217;s really cool, but this doesn&#8217;t even touch the limits of how you can apply this. In addition to solid color boxes, we could also apply this to photos and gradients (which would be much harder in a more traditional corner system). Our corners really don&#8217;t care what type of content they&#8217;re applied on, they only really care about the background color. Let&#8217;s try it out on some different page elements (accompanying HTML and CSS are included for each style):</p>
<h3>The Mini Profile</h3>
<h4>HTML:</h4>
<pre>&lt;div class=&quot;box photo&quot;&gt;
	&lt;div class=&quot;corner TL&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner TR&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner BL&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner BR&quot;&gt;&lt;/div&gt;
	&lt;h3&gt;My Profile&lt;/h3&gt;
	&lt;img src=&quot;http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/kyle.jpg&quot; alt=&quot;Me&quot; /&gt;
&lt;/div&gt;</pre>
<h4>CSS:</h4>
<pre class="brush:css">.photo {
	width: 200px;
	padding: 0;
}
.photo h3 {
	background: #000;
	color: #fff;
	padding: 10px 20px;
	margin: 0;
	font-size: 1em;
}</pre>
<style type="text/css">.myPhoto { width: 200px; padding: 0; }
.myPhoto h3 { background: #000; color: #fff; padding: 10px 20px; margin: 0; font-size: 1em; }</style>
<div class="box myPhoto">
<div class="corner TL"></div>
<div class="corner TR"></div>
<div class="corner BL"></div>
<div class="corner BR"></div>
<h3>My Profile</h3>
<p>	<img src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/kyle.jpg" alt="Me" />
</div>
<h3>The Gradient</h3>
<h4>HTML:</h4>
<pre>&lt;div class=&quot;box blueGradient&quot;&gt;
	&lt;div class=&quot;corner TL&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner TR&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner BL&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;corner BR&quot;&gt;&lt;/div&gt;
	&lt;p&gt;Notice the gradient background image!&lt;/p&gt;
&lt;/div&gt;</pre>
<h4>CSS:</h4>
<pre>.blueGradient {
	background: url(http://www.kyleschaeffer.com/wp-content/themes/life/images/sky-day.png) bottom repeat-x;
	color: #fff;
}</pre>
<style type="text/css">.blueGradient { background: url(http://www.kyleschaeffer.com/wp-content/themes/life/images/sky-day.png) bottom repeat-x; color: #fff; }</style>
<div class="box blueGradient">
<div class="corner TL"></div>
<div class="corner TR"></div>
<div class="corner BL"></div>
<div class="corner BR"></div>
<p>Notice the gradient background image! Lorem ipsum dolor sit amet, consectetur adipiscing elit. In facilisis posuere purus, vitae sagittis enim sodales at. Proin in purus et metus vestibulum cursus. Vivamus volutpat dolor quis lectus cursus et lobortis felis iaculis. Aenean ut enim magna, sit amet convallis mi. In hac habitasse platea dictumst. In hac habitasse platea dictumst.</p>
</div>
<p>We&#8217;ve accomplished all of the styles you see above using a single image and some fancy CSS footwork. This really minimizes the impact of your corners on page download times, especially if you&#8217;re using a number of different styles on a single background color. No scripts, no confusing HTML, simple markup, and a single image. Happy styling.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/best-practices/reusable-transparent-css-rounded-corners/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>A Very Simple CSS Chat Bubble</title>
		<link>http://kyleschaeffer.com/tutorials/a-very-simple-css-chat-bubble/</link>
		<comments>http://kyleschaeffer.com/tutorials/a-very-simple-css-chat-bubble/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 13:38:19 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=293</guid>
		<description><![CDATA[Each time you implement a new design element into your site, there are a vast array of approaches you can take to achieve the same outcome. Often times, I feel that the most simple of solutions is the best one. When implementing the &#8220;user comments&#8221; feature into ThumbSticks.com, I decided to wrap each user comment [...]]]></description>
			<content:encoded><![CDATA[<p>Each time you implement a new design element into your site, there are a vast array of approaches you can take to achieve the same outcome. Often times, I feel that the <a href="http://www.kyleschaeffer.com/best-practices/the-wisdom-of-simplicity/">most simple of solutions</a> is the best one. When implementing the &#8220;user comments&#8221; feature into <a href="http://thumbsticks.com">ThumbSticks.com</a>, I decided to wrap each user comment in a sort of &#8220;chat bubble box,&#8221; much like you would see in a comic book story. I experimented with various solutions that gave me different amounts of flexibility and performance, but I eventually settled on a very simple solution that resulted in what I think is an elegant CSS chat bubble.<span id="more-293"></span></p>
<h3>The Idea</h3>
<p>First of all, I will say that <strong>this approach only really works if you know the maximum size of your comment data</strong>. On ThumbSticks.com, for instance, users can&#8217;t enter comments that are over 300 characters in length, so I have a good idea of how large each comment box could possibly get. Rather than splicing my comment box into multiple images (which is more flexible, but decreases page performance and increases download times), I decided to create a single image that is used to wrap each comment chat bubble:</p>
<h3>The Image</h3>
<p><img src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2009/09/commentBg.png" alt="Comment Chat Bubble" width="477" height="300" /></p>
<p>Basically, my chat bubble boxes can shrink to any size, but they can&#8217;t grow beyond the height of this image. If you know exactly how large your data can get, this is a really simple solution to implement. All that I need to show my chat bubbles is a bit of HTML and CSS.</p>
<h3>The Nitty-Gritty</h3>
<p><strong>HTML:</strong></p>
<pre>&lt;div class=&quot;bubble&quot;&gt;
	&lt;div class=&quot;bubbleHeader&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;bubbleInner&quot;&gt;
		&lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;</pre>
<p><strong>CSS:</strong></p>
<pre>.bubble {
	width: 477px;
	background: url('/path/to/commentBg.png') no-repeat;
	background-position: 100% 100%;
}
.bubbleHeader {
	height: 20px;
	background: url('/path/to/commentBg.png') no-repeat;
	background-position: 100% 0;
}
.bubbleInner {
	padding: 0 20px 10px 37px;
}</pre>
<p>Make sure you change &#8220;/path/to/comment.Bg.png&#8221; to reflect the actual path to the background image you&#8217;re using. Once you&#8217;ve dropped this into your design, you should see something that <a href="http://thumbsticks.com/games/xbox-360/call-of-duty-world-at-war">looks a little like this</a>.</p>
<p>Good luck, and happy styling!</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/tutorials/a-very-simple-css-chat-bubble/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Wisdom of Simplicity</title>
		<link>http://kyleschaeffer.com/best-practices/the-wisdom-of-simplicity/</link>
		<comments>http://kyleschaeffer.com/best-practices/the-wisdom-of-simplicity/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 18:38:11 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=237</guid>
		<description><![CDATA[Web designers would be wise to approach every situation with one thing in mind: simplicity. Simplicity is the cornerstone of designing a well-structured and highly flexible HTML/CSS design. I&#8217;ve found that all too often, many designers approach a website with one thing in mind: the &#8220;look&#8221; of the fully rendered site. They approach each page [...]]]></description>
			<content:encoded><![CDATA[<p>Web designers would be wise to approach every situation with one thing in mind: simplicity. Simplicity is the cornerstone of designing a well-structured and highly flexible HTML/CSS design. I&#8217;ve found that all too often, many designers approach a website with one thing in mind: the &#8220;look&#8221; of the fully rendered site. They approach each page or screen with a definitive pixel-perfect image in their heads, and they execute the design process to produce each pixel as it was originally intended.<span id="more-237"></span></p>
<p>The truth of the matter is that a web document is a compilation of various highly organized computer languages (XML, HTML, CSS, JavaScript, etc.). The web designer has the difficult task of considering the &#8220;art&#8221; of the design as well as the technical architecture of it. A truly skilled web designer has the ability to think both creatively and logically.  A designer bridges the gap between design and development, which is sometimes a very difficult task; a task made far more feasible by the utilization of simplicity.</p>
<h3>A Simple Example</h3>
<p>I use the word &#8220;simplicity&#8221; in a very generic sense; it&#8217;s a very broad term, so I&#8217;d like to use a few examples to show how simplicity can be a great aid in web design.  Take, for instance, the anchor tag (<code>&lt;a/&gt;</code>).  The anchor tag is at the very foundation of HTML; it is the most basic implementation of the concept of the internet:  the hyperlink.  It&#8217;s so simple in and of itself, how could designers possibly do anything at all to mar it&#8217;s glorious simplicity?</p>
<p><strong>Here are two anchor tags.  They appear quite identical, but the behavior of each is remarkably different.  Which one is better?</strong></p>
<style type="text/css">	.complexLink { display: block; width: 15em; padding: 1em 0; margin: 0 2em 2em 0; float: left; background: #f0f0f0; border: 1px #e0e0e0 solid; -moz-border-radius: 1em; -webkit-border-radius: 1em; text-align: center; }
.complexLink:hover { border-color: #c0c0c0; }
.complexLink a { color: #555; }
.complexLink a:hover { color: #d56e1c; text-decoration: none; }
.simpleLink { display: block; width: 15em; padding: 1em 0; margin: 0 2em 2em 0; float: left; background: #f0f0f0; color: #555; border: 1px #e0e0e0 solid; -moz-border-radius: 1em; -webkit-border-radius: 1em; text-align: center; }
.simpleLink:hover { color: #d56e1c; border-color: #c0c0c0; text-decoration: none; }
</style>
<p><span class="complexLink"><a href="javascript:alert('The art of art, the glory of expression and the sunshine of the light of letters, is simplicity.\n~ Walt Whitman');">A Simple Link</a></span> <a class="simpleLink" href="javascript:alert('Design is not just what it looks like and feels like. Design is how it works.\n~ Steve Jobs');">A Simple Link</a></p>
<div style="clear: both;">&nbsp;</div>
<p>Did you notice a difference? At first glance, they are identical, but the interactive behavior of each link is quite different. Move your mouse cursor over each link, and notice the difference in clickable area on each link. On the first anchor tag, only the text &#8220;A Simple Link&#8221; is hyperlinked. The padded area around the link is not. The second link, however, is fully hyperlinked (the entire padded area is clickable).</p>
<h3>Visual Interactivity</h3>
<p>This is a demonstration of the fundamental elements of simplicity in design. A user who visits your site doesn&#8217;t care how you&#8217;ve formatted your CSS and HTML, or how you&#8217;ve scripted page behavior to allow for access to your data. The user only cares about navigating to the content they&#8217;re interested in. When a user sees a visual element on the page (such as the links above), they want to move their mouse pointer to that element and click. If a particular page element has some level of interactive behavior associated with it, the <em>entire element</em> should react to that behavior.</p>
<h3>Logical Simplicity</h3>
<p>Treating page elements in this fashion can also help eliminate extraneous HTML and CSS. Again, using the example above, let&#8217;s look at the source code of these two different links and examine their differences.</p>
<pre>&lt;style type=&quot;text/css&quot;&gt;
.complexLink {
	display: block;
	width: 15em;
	padding: 1em 0;
	margin: 0 2em 2em 0;
	float: left;
	background: #f0f0f0;
	border: 1px #e0e0e0 solid;
	-moz-border-radius: 1em;
	-webkit-border-radius: 1em;
	text-align: center;
}
.complexLink:hover {
	border-color: #c0c0c0;
}
.complexLink a {
	color: #555;
}
.complexLink a:hover {
	color: #d56e1c;
	text-decoration: none;
}
&lt;/style&gt;
&lt;span class=&quot;complexLink&quot;&gt;&lt;a href=&quot;...&quot;&gt;A Simple Link&lt;/a&gt;&lt;/span&gt;</pre>
<pre>&lt;style type=&quot;text/css&quot;&gt;
.simpleLink {
	display: block;
	width: 15em;
	padding: 1em 0;
	margin: 0 2em 2em 0;
	float: left;
	background: #f0f0f0;
	color: #555;
	border: 1px #e0e0e0 solid;
	-moz-border-radius: 1em;
	-webkit-border-radius: 1em;
	text-align: center;
}
.simpleLink:hover {
	color: #d56e1c;
	border-color: #c0c0c0;
	text-decoration: none;
}
&lt;/style&gt;
&lt;a class=&quot;simpleLink&quot; href=&quot;...&quot;&gt;A Simple Link&lt;/a&gt;</pre>
<p>The code above relates to the first and second links, respectively. At first, the two links seemed almost identical, but now the differences are really starting to show. Not only is our more complex example (the first link) more difficult for the user to interpret, but it&#8217;s also more work for you as the designer because you have more elements, layers, and styles to deal with.</p>
<h3>Now Repeat</h3>
<p>It might be somewhat trivial to look at an anchor tag in such depth, but this type of design methodology extends into every aspect of web development. From HTML to CSS, from JavaScript to server-side programming, simplicity is an essential element of a good design. You&#8217;ll find that adopting this mentality can increase your productivity, lower the costs of site re-design, and expedite efforts to troubleshoot and resolve rendering problems in your web application. Less really <em>is</em> more.</p>
<p>Take a moment, take your time, and think about each and every element that you design as an independent function of logic and art. Think about the best way to approach every control, and apply uncompromising simplicity wherever possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/best-practices/the-wisdom-of-simplicity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Server, New Theme</title>
		<link>http://kyleschaeffer.com/personal/new-server-new-theme/</link>
		<comments>http://kyleschaeffer.com/personal/new-server-new-theme/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 22:52:23 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=169</guid>
		<description><![CDATA[In the process of moving my blog to a new web server, I decided to take this opportunity to create a new theme for the site. The theme changes depending on what time of day or time of the year that you visit, so check back often! I&#8217;ll continue to add little customizations for holidays, [...]]]></description>
			<content:encoded><![CDATA[<p>In the process of moving my blog to a new web server, I decided to take this opportunity to create a new theme for the site. The theme changes depending on what time of day or time of the year that you visit, so check back often! I&#8217;ll continue to add little customizations for holidays, special occasions, etc. (what a wonderful use of my time it is to create little meaningless PNG images). Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/personal/new-server-new-theme/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Five Elegant Rounded Corner Boxes</title>
		<link>http://kyleschaeffer.com/web-controls/five-elegant-rounded-corner-boxes/</link>
		<comments>http://kyleschaeffer.com/web-controls/five-elegant-rounded-corner-boxes/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 14:57:10 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Web Controls]]></category>
		<category><![CDATA[Corners]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=101</guid>
		<description><![CDATA[I wanted to really take the concept of my &#8220;Karate Corners&#8221; design to new levels, so I created this simple demo to show you how visual elegance can work in tandem with technical simplicity. Seeing is believing, so without further adieu&#8230; View the Karate Corners Demo by clicking here.]]></description>
			<content:encoded><![CDATA[<p>I wanted to really take the concept of my &#8220;<a href="http://www.kyleschaeffer.com/?p=31">Karate Corners</a>&#8221; design to new levels, so I created this simple demo to show you how visual elegance can work in tandem with technical simplicity.<span id="more-101"></span></p>
<p>Seeing is believing, so without further adieu&#8230;</p>
<p><a href="http://www.kyleschaeffer.com/karatecorners/"><img class="alignnone size-full wp-image-102" title="Karate Corners Demo" src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/karate-demo.jpg" alt="" border="0" width="319" height="173" /></a></p>
<p><strong><a href="http://www.kyleschaeffer.com/karatecorners/">View the Karate Corners Demo by clicking here.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/web-controls/five-elegant-rounded-corner-boxes/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>All About Table-less Column Design</title>
		<link>http://kyleschaeffer.com/best-practices/all-about-tableless-column-design/</link>
		<comments>http://kyleschaeffer.com/best-practices/all-about-tableless-column-design/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 17:43:25 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Columns]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=54</guid>
		<description><![CDATA[There are a number of ways to create vertical columns in your XHTML design without using the &#60;table/&#62; tag and the horrendous amount of HTML that always seems to accompany it. Each method listed here is superior in various situations, so choose a good fit for your particular design. But&#8230;why? Why do we go through [...]]]></description>
			<content:encoded><![CDATA[<p>There are a number of ways to create vertical columns in your XHTML design without using the <code>&lt;table/&gt;</code> tag and the horrendous amount of HTML that always seems to accompany it. Each method listed here is superior in various situations, so choose a good fit for your particular design.<span id="more-54"></span></p>
<h3>But&#8230;why?</h3>
<p>Why do we go through all the trouble of creating table-less designs? In short, the answer is performance. At times, it may feel easier to simply drop in a table tag and quickly split your design into columns, but that&#8217;s not always the best option. Tables create a large amount of extraneous HTML that can make your pages slower for visitors to download. While it may not seem like a huge difference at first, when designing a template for a very large site, the difference can be astounding.</p>
<p>CSS that is defined in externally linked files is cached on client computers, meaning that anything you put in your external CSS files is downloaded only once. Once that CSS file is downloaded, it is quickly loaded on subsequent page visits, which is faster for your visitor and easier on your web server.</p>
<p>Why is this important? Stay with me, we&#8217;re getting there!</p>
<p>Generally, the content in your site changes as visitors browse from page to page, but the overall design remains the same. It is much easier (and faster) to store this persistent design information in cached files, such as images and CSS.</p>
<p><strong>In a table-less column design, almost all design information is stored in cached CSS files. A design that uses tables, on the other hand, often includes some of this information directly in the HTML, forcing users to download the HTML on every page in the site.</strong> Whenever possible, site design should be done in CSS rather than in HTML; for this reason, table-less designs are the modern preferred standard in web design.</p>
<h3>Floating Columns</h3>
<p>The <strong>float</strong> attribute in CSS is very powerful. So powerful, in fact, that many people seem to shy away from using it. Don&#8217;t be afraid! A bad float can ruin any good design, but using them when appropriate will alleviate your HTML-table woes.</p>
<h4>The HTML:</h4>
<pre>&lt;div class=&quot;columns&quot;&gt;
    &lt;div class=&quot;left&quot;&gt;
        &lt;p&gt;&lt;strong&gt;This is left-hand content.&lt;/strong&gt;&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class=&quot;right&quot;&gt;
        &lt;p&gt;&lt;strong&gt;This is right-hand content.&lt;/strong&gt;&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class=&quot;bottom&quot;&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<h4>The CSS:</h4>
<pre>.left {
	width: 60%;
	float: left;
	padding: 0 2% 0 0;
}
.right {
	width: 35%;
	float: left;
	padding: 0 0 0 2%;
}
.bottom {
	clear: both;
}</pre>
<h4>The Result:</h4>
<p><img class="alignnone size-full wp-image-59" title="Floating Columns" src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/columns1.jpg" alt="" width="378" height="182" /></p>
<p><strong>Advantages:</strong><br />
Fluid width &#8211; <em>allows for dynamic width (resizing)</em><br />
Fluid height &#8211; <em>matches the height of the tallest column, allowing for fully dynamic height of all columns</em></p>
<p><strong>Disadvantages:</strong><br />
Floating &#8211; <em>if you are using fixed-width columns, and if the content in a column is too wide, your columns will word-wrap within your design and stack on top of each other</em><br />
Variable column height &#8211; <em>background colors or images applied to columns will not match in height</em></p>
<h3>Absolute Columns</h3>
<p>In many cases, the floating column design does the trick quite amiably. If, however, for some reason you find yourself in a situation where you are using a fixed-width design, and you really can&#8217;t control the width of content in your site, floating columns can become a nightmare. There&#8217;s nothing worse than seeing your left-hand column disappear from your layout, only to be re-positioned at the bottom of your page! If that&#8217;s the case, you may consider using the absolutely-positioned column design.</p>
<h4>The HTML:</h4>
<pre>&lt;div class=&quot;columns&quot;&gt;
    &lt;div class=&quot;left&quot;&gt;
        &lt;p&gt;&lt;strong&gt;This is left-hand content.&lt;/strong&gt;&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class=&quot;right&quot;&gt;
        &lt;p&gt;&lt;strong&gt;This is right-hand content.&lt;/strong&gt;&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<h4>The CSS:</h4>
<pre>.columns {
	position: relative;
}
.left {
	width: 60%;
	margin: 0 35% 0 0;
	padding: 0 2% 0 0;
}
.right {
	position: absolute;
	top: 0;
	right: 0;
	width: 35%;
	padding: 0 0 0 2%;
}</pre>
<h4>The Result:</h4>
<p><img class="alignnone size-full wp-image-60" title="Absolute Columns" src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/columns2.jpg" alt="" width="370" height="152" /></p>
<p><strong>Advantages:</strong><br />
Fluid width &#8211; <em>allows for dynamic width (resizing)</em><br />
No floating &#8211; <em>consistent even when content is too wide to display</em></p>
<p><strong>Disadvantages:</strong><br />
Minimum height &#8211; <em>the absolutely-positioned column must always be shorter in height than the fluid column(s), else it will display on top of design elements below</em><br />
Variable column height &#8211; <em>background colors or images applied to columns will not match in height</em></p>
<h3>Concerning &#8220;variable column height.&#8221;</h3>
<p>I would like to point out that &#8220;variable column height&#8221; is listed as a disadvantage of each method. The main disadvantage in using table-less CSS column designs is that when you have two elements side-by-side, they won&#8217;t necessarily match in height. If your design requires two shaded columns to match in height, this table-less approach may not be your best option. In general, it&#8217;s best to create designs that don&#8217;t require this type of approach from the get-go. Many people try to compensate for this lack of height-matching by using repeating background images that make it appear as if the columns match in height, but I have never been a fan of adding images to do something that HTML and CSS could handle otherwise.</p>
<h3>When all else fails&#8230;</h3>
<p>The only time I use a table in HTML is to (1) display tabular data or (2) when I absolutely need to have two height-matching elements display side-by-side in a design. Some fanatical CSS enthusiasts would argue that this is a lame approach, but in some cases designers need to act on simple pragmatism.</p>
<p>If you&#8217;re in a situation where you need to use a table, please do not use extraneous HTML. <strong>The <code>cellpadding</code> and <code>cellspacing</code> attributes are not needed!</strong> You can do everything with CSS. It goes something like this:</p>
<h4>The HTML:</h4>
<pre>&lt;table class=&quot;columns&quot;&gt;
    &lt;tr&gt;
        &lt;td class=&quot;left&quot;&gt;
            &lt;p&gt;&lt;strong&gt;This is left-hand content.&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
        &lt;/td&gt;
        &lt;td class=&quot;right&quot;&gt;
            &lt;p&gt;&lt;strong&gt;This is right-hand content.&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;</pre>
<h4>The CSS:</h4>
<pre>.columns {
	width: 100%;
	border-collapse: collapse;
}
.left {
	width: 60%;
	padding: 0;
	vertical-align: top;
}
.right {
	width: 40%;
	padding: 0;
	vertical-align: top;
}</pre>
<h4>The Result:</h4>
<p><img class="alignnone size-full wp-image-62" title="Table Columns" src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/columns3.jpg" alt="" width="364" height="171" /></p>
<p>It may still be a table, but it&#8217;s a minimal table if I ever saw one.</p>
<p>Good luck, and happy styling.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/best-practices/all-about-tableless-column-design/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Karate Corners: XHTML/CSS Rounded Corners</title>
		<link>http://kyleschaeffer.com/tutorials/karate-corners-easy-rounded-corners-xhtml-no-script/</link>
		<comments>http://kyleschaeffer.com/tutorials/karate-corners-easy-rounded-corners-xhtml-no-script/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 12:58:10 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Controls]]></category>
		<category><![CDATA[Corners]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.kyleschaeffer.com/?p=31</guid>
		<description><![CDATA[I&#8217;ve seen a lot of different ways to create round corners and boxes in web sites, and quite frankly I haven&#8217;t exactly fallen in love with any of them. A lot of the methods that I&#8217;ve seen use either (1) a table structure which I try to avoid at all costs, (2) too many nested [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen a lot of different ways to create round corners and boxes in web sites, and quite frankly I haven&#8217;t exactly fallen in love with any of them.  A lot of the methods that I&#8217;ve seen use either (1) a table structure which I try to avoid at all costs, (2) too many nested <code>&lt;div&gt;</code> tags, (3) complex CSS, or (4) too many different images that have to be loaded all at once.<span id="more-31"></span></p>
<p><strong>Update:</strong> <a href="http://www.kyleschaeffer.com/web-controls/five-elegant-rounded-corner-boxes/">Read my subsequent post for a more advanced example of this technique!</a><br />
<strong>Update:</strong> <a href="http://www.kyleschaeffer.com/best-practices/reusable-transparent-css-rounded-corners/">Read a even <em>more</em> advanced version of this technique in an even <em>newer</em> tutorial!</a><br />
<strong>Update:</strong> <a href="http://www.kyleschaeffer.com/tutorials/ie-corner-inserts-via-jquery/">Find out how to automatically generate the HTML and CSS for this technique using jQuery.</a></p>
<p>I took the best of the best and came up with a very simple way to create totally scalable boxes with round corners.  I&#8217;ve tested this on Internet Explorer 6, IE 7, Mozilla FireFox 2, Firefox 3, Opera 9, and Safari 3.</p>
<h3>The Code</h3>
<p>The HTML code is relatively simple.  You have an outer <code>&lt;div&gt;</code> tag with four &#8220;corner&#8221; <code>&lt;div&gt;</code>s inside of it.  Each of these corner <code>&lt;div&gt;</code>s are positioned with CSS so that they always appear at each corner of the outer <code>&lt;div&gt;</code> box.</p>
<h4>HTML:</h4>
<pre>&lt;div class="cornerBox"&gt;
    &lt;div class="corner TL"&gt;&lt;/div&gt;
    &lt;div class="corner TR"&gt;&lt;/div&gt;
    &lt;div class="corner BL"&gt;&lt;/div&gt;
    &lt;div class="corner BR"&gt;&lt;/div&gt;
    &lt;div class="cornerBoxInner"&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<h4>CSS:</h4>
<pre>.cornerBox {
	position: relative;
	background: #cfcfcf;
	width: 100%;
}
.corner {
	position: absolute;
	width: 10px;
	height: 10px;
	background: url('corners.gif') no-repeat;
	font-size: 0%;
}
.cornerBoxInner {
	padding: 10px;
}
.TL {
	top: 0;
	left: 0;
	background-position: 0 0;
}
.TR {
	top: 0;
	right: 0;
	background-position: -10px 0;
}
.BL {
	bottom: 0;
	left: 0;
	background-position: 0 -10px;
}
.BR {
	bottom: 0;
	right: 0;
	background-position: -10px -10px;
}</pre>
<h3>The Image</h3>
<p><img class="size-medium wp-image-32" title="The 20x20 corner image used in this demo." src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/corners.gif" alt="The 20x20 corner image used in this demo." width="20" height="20" /></p>
<p>Only one image is used for this box (shown above).  In my example, I created a 20&#215;20 circle, which is comprised of four 10&#215;10 corners.  By shifting the background image around, you can eliminate the need to download four separate GIF files on each of your boxes.</p>
<h3>The Result</h3>
<p><a href="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/karatecornersdemo.htm" target="_blank"><img class="size-full wp-image-34" title="Click on this image to see the demo, where you can resize your browser window to see how the box scales as the height and width changes." src="http://kyleschaeffer.com/wordpress/wp-content/uploads/2008/10/cornersbox.gif" border="0" alt="Click on this image to see the demo, where you can resize your browser window to see how the box scales as the height and width changes." width="472" height="122" /></a></p>
<p>Karate Corners!  Click on the image above to see the HTML demo.  Happy styling!</p>
]]></content:encoded>
			<wfw:commentRss>http://kyleschaeffer.com/tutorials/karate-corners-easy-rounded-corners-xhtml-no-script/feed/</wfw:commentRss>
		<slash:comments>65</slash:comments>
		</item>
	</channel>
</rss>
