<?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>Carsonified &#187; CSS</title>
	<atom:link href="http://carsonified.com/blog/category/design/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://carsonified.com</link>
	<description></description>
	<lastBuildDate>Tue, 09 Mar 2010 15:52:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Books that Inspire</title>
		<link>http://carsonified.com/blog/design/books-that-inspire/</link>
		<comments>http://carsonified.com/blog/design/books-that-inspire/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 21:26:21 +0000</pubDate>
		<dc:creator>Keir Whitaker</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://carsonified.com/?p=3812</guid>
		<description><![CDATA[By <strong>Keir Whitaker</strong><br />Yesterday I had the pleasure of sitting at the back of &#8220;Handcrafted CSS&#8220;, a workshop led by Dan Cederholm and Ethan Marcotte. The workshop was based on their recently published book of the same name, if you don&#8217;t own a copy definitely add it to your holiday shopping list.
As attendees leafed through the book during [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fbooks-that-inspire%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fbooks-that-inspire%2F" height="61" width="51" /></a></div><p>Yesterday I had the pleasure of sitting at the back of &#8220;<a href="http://handcraftedcss.com/">Handcrafted CSS</a>&#8220;, a workshop led by <a href="http://www.simplebits.com/">Dan Cederholm</a> and <a href="http://unstoppablerobotninja.com/">Ethan Marcotte</a>. The workshop was based on their recently published book of the same name, if you don&#8217;t own a copy definitely add it to your holiday shopping list.</p>
<p>As attendees leafed through the book during the breaks I realised how much of I have relied on and enjoyed learning about web design and development from books. Funnily enough Dan&#8217;s first book, &#8220;<a href="http://astore.amazon.com/simplebits-20/detail/1590593812">Web Standard Solutions</a>&#8220;, released in 2004 was the the first book I ever bought on CSS. It turns out it was the first CSS book for many designers I know. It taught me a lot and is still very relevant.<span id="more-3812"></span></p>
<p>It got me thinking about the most inspiring web related books I have on my shelf. Here in no particular order are my personal top five. Some of them have been updated and superseded but all remain great reference material.</p>
<ul>
<li><a href="http://astore.amazon.com/simplebits-20/detail/1590593812">Web Standard Solutions</a> by Dan Cederholm</li>
<li><a href="http://www.transcendingcss.com/">Transcending CSS</a> by Andy Clarke</li>
<li><a href="http://www.sitepoint.com/books/phpant2/?historicredirect=phpant1">The PHP Anthology</a> by Harry Fuecks et al (1st edition no longer available)</li>
<li><a href="http://www.djangobook.com/en/2.0/">The Definitive Guide to Django</a> by Adrian Holovaty and Jacob Kaplan-Moss</li>
<li><a href="http://domscripting.com/book/">DOM Scripting</a> by Jeremey Keith</li>
</ul>
<p>What are your favourites? Link up your must have&#8217;s in the comments, I have an Amazon voucher I need to spend and love a good read.</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=3812&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/design/books-that-inspire/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>How to Create a Valid Non-Javascript Lightbox</title>
		<link>http://carsonified.com/blog/design/css/how-to-create-a-valid-non-javascript-lightbox/</link>
		<comments>http://carsonified.com/blog/design/css/how-to-create-a-valid-non-javascript-lightbox/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 06:48:20 +0000</pubDate>
		<dc:creator>Jenna Smith</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://carsonified.com/?p=3230</guid>
		<description><![CDATA[By <strong>Jenna Smith</strong><br />I recently came across a solution on CSSPlay for a JavaScript free lightbox that uses invalid markup. So, being a sucker for a challenge, I set myself the task of creating one with valid markup and I eventually succeeded.
Here&#8217;s one I made earlier. It works in FF, Safari, Chrome, IE6, IE7 and IE8 and this [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fcss%2Fhow-to-create-a-valid-non-javascript-lightbox%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fcss%2Fhow-to-create-a-valid-non-javascript-lightbox%2F" height="61" width="51" /></a></div><p>I recently came across a <a href="http://www.cssplay.co.uk/menu/lightbox-click.html">solution on CSSPlay</a> for a JavaScript free lightbox that uses invalid markup. So, being a sucker for a challenge, I set myself the task of creating one <strong>with valid markup</strong> and I eventually succeeded.</p>
<p>Here&#8217;s <a title="Demo of the JavaScript free lightbox" href="http://www.growldesign.co.uk/projects/lb/">one I made earlier</a>. It works in FF, Safari, Chrome, IE6, IE7 and IE8 and this article will explain how…<br />
<span id="more-3230"></span><br />
<strong>Note:</strong> This article assumes you have a basic understanding of (X)HTML and CSS.</p>
<h3>Step 1: Writing the Markup</h3>
<pre class="html"><code>&lt;div id="container"&gt;
    &lt;div id="header"&gt;
        &lt;h1&gt;A valid XHTML and CSS Lightbox (no JavaScript)&lt;/h1&gt;
        &lt;p&gt;&lt;strong&gt;by Jenna Smith&lt;/strong&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="content"&gt;
        &lt;h2&gt;Click any of the links below to see it in action&lt;/h2&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur &lt;a href="#"&gt;about us&lt;/a&gt; adipiscing elit.
        Donec massa lorem, elementum et mollis non, viverra a est. Proin nunc orci, tristique at egestas et,
        interdum ac ipsum. Nulla &lt;a href="#"&gt;more info&lt;/a&gt; vulputate erat ac gravida. Mauris facilisis, leo ac condimentum commodo,
        justo eros molestie dolor, a posuere orci tortor sed lacus. Suspendisse dictum, magna eu posuere tempor,
        augue diam tempor lacus, sed hendrerit nulla ante quis justo. Aliquam eget tellus risus.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="footer"&gt;
    	&lt;p&gt;Copyright 2009 Jenna Smith&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>You will notice the markup is very simple at the moment and that we have two links leading nowhere. These links will eventually<br />
trigger lightboxes, but before they do, we need to add the markup for said lightboxes after the container &lt;div&gt;:</p>
<pre class="html"><code>&lt;ul id="lightboxes"&gt;
    &lt;li id="lightbox-about"&gt;
        &lt;div class="box"&gt;
            &lt;h3&gt;About&lt;/h3&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;a href="#" class="close" title="close window"&gt;x&lt;/a&gt;
        &lt;/div&gt;
    &lt;/li&gt;
    &lt;li id="lightbox-more"&gt;
        &lt;div class="box"&gt;
            &lt;h3&gt;More stuff&lt;/h3&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;a href="#" class="close" title="close window"&gt;x&lt;/a&gt;
        &lt;/div&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p>This is by no means semantic but I chose this markup because it made managing the CSS a little simpler. I&#8217;d recommend leaving the markup as is for the purposes of following this tutorial, however, feel free to code this part as you wish as long as you use the same amount of elements and tweak the CSS where necessary.</p>
<h3>Step 2: Making it Look Pretty</h3>
<p>Add the following CSS to the &lt;head&gt; of your document (we will be doing CSS inline to simplify this tutorial):</p>
<pre class="css"><code>html {
font-size: 75%;} 

html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;}

body {
background-color: #f8f8f8;
font-family: arial, helvetica, sans-serif;
color: #777;
text-align: center;
font-size: 1.0833em;
line-height: 1.6923em;}

a {
color: #09F;}

h2 {
font-weight: normal;}

p {
margin: 0 0 1.6923em 0;}        

#container {
width: 100%;
height: 100%;}

#header,
#content,
#footer {
text-align: left;
width: 870px;
margin: 0 auto;
padding: 40px;}

#header,
#footer {
background-color: #eee;}

#header h1 {
margin: 0;}

#header p {
margin: 5px 0 0;}

#content {
background-color: #fff;}		

/* ---------------------------------------------------------- */
/* LIGHTBOXES
/* ---------------------------------------------------------- */
#lightboxes {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
list-style-type: none;
text-align: left;}

#lightboxes li {
width: 100%;
height: 9999px;
position: relative;
background: rgba(0,0,0,.5);}

#lightboxes .box {
position: absolute;
width: 400px;
height: 400px;
left: 50%;
top: 50px;
border: 10px solid #999;
margin-left: -230px;
background-color: #fff;
padding: 20px;}

#lightboxes h3 {
font-weight: normal;
font-size: 1.8461em;
margin: 0 0 0.4583em 0;}

#lightboxes a.close {
position: absolute;
top: 20px;
right: 20px;
display: block;
width: 20px;
line-height: 20px;
text-align: center;
background-color: #ddd;
text-decoration: none;
font-weight: bold;
color: #999;
font-size: 1.2em;}

#lightboxes a.close:hover {
background-color: #999;
color: #fff;}
</code></pre>
<p>This should all be relatively easy to understand, however I just want to go over a few areas and clarify why some elements have been given certain properties. Mainly the following lightbox styling:</p>
<pre class="css"><code>#lightboxes li {
width: 100%;
height: 9999px;
position: relative;
background: rgba(0,0,0,.5);}</code></pre>
<p>The &lt;li&gt;s in my example are acting as the lightbox overlay that you see underneath the lightbox &#8216;box&#8217; itself so I have given it an extremely large height of 9999px with the assumption that no one will have a resolution larger than that. The reason for not using a 100% height is because it causes a window resize bug… feel free to try it at the end of the tutorial to see what I mean and if you can come up with a better solution, please do share!</p>
<p>Next you will notice that I am using an RGBa background colour. If you are not sure what this is/does please<a href="http://css-tricks.com/rgba-browser-support/"> read about RGBa on CSSTricks</a>. Internet Explorer, as ever, doesn&#8217;t support RGBa so in order to get around this, we need to add some IE specific styling and markup. Place the following CSS in the &lt;head&gt; of your document:</p>
<pre class="css"><code>&lt;!--[if IE]&gt;
&lt;style type="text/css"&gt;
    #lightboxes .ie-bg {
    background: #000;
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    filter: alpha(opacity=75);}
&lt;/style&gt;
&lt;![endif]--&gt;</code></pre>
<p>Then add the following markup to the bottom of your lightboxes (before the closing &lt;/li&gt; of each lightbox):</p>
<pre class="html"><code>&lt;!--[if IE]&gt;
&lt;div class="ie-bg"&gt;&lt;/div&gt;
&lt;![endif]--&gt;</code></pre>
<p>I&#8217;m sure someone will point out that this causes the ActiveX popup to appear in IE resulting in the non-JavaScript element of this tutorial being void however, this would still all work fine without the filter so that is purely aesthetics and not functionality.</p>
<p>Moving on&#8230;</p>
<h3>Step 3: Positioning the Lightboxes</h3>
<p>When previewing our progress you will have seen that the lightboxes currently sit below the content which isn&#8217;t much like lightbox behaviour. The  lightboxes need to sit on top of our content so a few more CSS properties are required to achieve this. Append this next snippet to  your #container styling:</p>
<pre class="css"><code>position: absolute;
top: 0;
left: 0;</code></pre>
<p>Now this is where things get a little confusing. Why did I add it to the #container and not the #lightboxes element? That&#8217;s because if I added it to the #lightboxes element it&#8217;s child elements would <strong>always</strong> be on top of our #container (no matter what) so we would never be able to click the links in the content again, even when the lightboxes are &#8216;closed&#8217;. Doing it this way enables us to position the #container<strong> between</strong> the #lightboxes child elements and you will see why this is necessary in the next step.</p>
<p>We also only ever want to see one lightbox at a time so adding <code>overflow: hidden;</code> to your #lightboxes styling will accomplish that. This works because the #lightboxes element was given a height of 100% in the CSS which will make it 100% height of your window. Therefore, it hides  anything past the height of the window. However, Internet Explorer requires a little extra in order to achieve the same effect so make sure you add  the following to your IE specific CSS within the conditional comment we added earlier:</p>
<pre class="css"><code>#lightboxes {
position: relative;}</code></pre>
<h3>Step 4: Opening and Closing the Lightboxes</h3>
<p>So we&#8217;ve got it looking good and everything is positioned in the right place but how do we open and close the lightboxes? Simples.</p>
<p>I&#8217;m sure you are all aware of linking to an an element on the same page with the use of the ID attribute and how it works. However, you may not have known that linking to an element that is hidden off the page causes the element to be &#8220;pulled&#8221; into view as opposed to the window jumping down to that element. I used the same technique on my <a href="http://net.tutsplus.com/tutorials/javascript-ajax/building-an-auto-scrolling-slideshow-that-works-with-and-without-javascript/">Auto-Scrolling Slideshow Tutorial</a> which further demonstrates how powerful this technique can be.</p>
<p>So with that in mind I can change the href values of our content links to the ID values of the lightboxes and create a new #close element that our close buttons will link to. Your markup would then look as follows:</p>
<pre class="html"><code>&lt;div id="container"&gt;
    &lt;div id="header"&gt;
        &lt;h1&gt;A valid XHTML and CSS Lightbox (no JavaScript)&lt;/h1&gt;
        &lt;p&gt;&lt;strong&gt;by Jenna Smith&lt;/strong&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="content"&gt;
        &lt;h2&gt;Click any of the links below to see it in action&lt;/h2&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur &lt;a href="#lightbox-about"&gt;about us&lt;/a&gt; adipiscing elit.
        Donec massa lorem, elementum et mollis non, viverra a est. Proin nunc orci, tristique at egestas et,
        interdum ac ipsum. Nulla &lt;a href="#lightbox-more"&gt;more info&lt;/a&gt; vulputate erat ac gravida. Mauris facilisis, leo ac condimentum commodo,
        justo eros molestie dolor, a posuere orci tortor sed lacus. Suspendisse dictum, magna eu posuere tempor,
        augue diam tempor lacus, sed hendrerit nulla ante quis justo. Aliquam eget tellus risus.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="footer"&gt;
    	&lt;p&gt;Copyright 2009 Jenna Smith&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;ul id="lightboxes"&gt;
    &lt;li id="close"&gt;&lt;/li&gt;
    &lt;li id="lightbox-about"&gt;
        &lt;div class="box"&gt;
            &lt;h3&gt;About&lt;/h3&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;a href="#close" class="close" title="close window"&gt;x&lt;/a&gt;
        &lt;/div&gt;
        &lt;!--[if IE]&gt;
        &lt;div class="ie-bg"&gt;&lt;/div&gt;
        &lt;![endif]--&gt;
    &lt;/li&gt;
    &lt;li id="lightbox-more"&gt;
        &lt;div class="box"&gt;
            &lt;h3&gt;More stuff&lt;/h3&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;a href="#close" class="close" title="close window"&gt;x&lt;/a&gt;
        &lt;/div&gt;
        &lt;!--[if IE]&gt;
        &lt;div class="ie-bg"&gt;&lt;/div&gt;
        &lt;![endif]--&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p>You won&#8217;t be able to test this at the moment because the empty #close element is sitting on top of the #container disabling you from clicking anything. However, if you append &#8216;#lightbox-about&#8217; to your URL you will notice the about lightbox appears and that changing it to &#8216;#close&#8217; will bring the empty lightbox element back into view. Neat huh?</p>
<p>Now we need to remove the background colour from the #close element so that it looks as if nothing is there and position it behind the #container element so that we can click the #container links.</p>
<p>Remember I mentioned positioning the #container <strong>between</strong> the lightbox elements in the last step? Well this is why and it would not be possible if we had absolutely positioned the #lightboxes instead of the #container.</p>
<p>This next piece of CSS needs to be added to style the #close element as mentioned above:</p>
<pre class="css"><code>#lightboxes #close {
background-color: transparent;
z-index: -1;}
</code></pre>
<p>Now you can open and close the lightboxes as expected!</p>
<p>How does that work? Well, if you do not set a z-index on an element then it will be layered depending on it&#8217;s position in the code.  Therefore, the lightbox &lt;li&gt;s automatically appear above the container as they are further in the markup. However, by giving one of them a  minus z-index I am forcing it behind any elements that precede it.</p>
<h3>Step 5: Adding More Content to the Container</h3>
<p>At the moment we haven&#8217;t got much content in our container so it all appears to be working fine. However, if you add pages and pages of content you will notice that we&#8217;re not quite finished. A scrollbar appears enabling you to scroll past the lightbox and it&#8217;s overlay. This is because the document is scrolling but the lightbox is only 100% height of the window, not the document. The #container is also 100% height of the window so a simple solution is to overflow the container so that <strong>it</strong> scrolls instead of the document by adding <code>overflow: auto;</code> to the #container element.</p>
<p>It will make more sense if you preview it in Internet Explorer where you will see two scroll bars. One for the #container and a disabled scrollbar for the document. This is easy to fix by adding the following CSS to your IE specific CSS:</p>
<pre class="css"><code>html {
overflow-y: auto;}</code></pre>
<p>…and we&#8217;re done.</p>
<p>Your document in it&#8217;s entirety should be similar to below:</p>
<pre class="html"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;XHML and CSS Lightbox&lt;/title&gt;

    &lt;style type="text/css"&gt;
    html {
    font-size: 75%;} 

    html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;}

    body {
    background-color: #f8f8f8;
    font-family: arial, helvetica, sans-serif;
    color: #777;
    text-align: center;
    font-size: 1.0833em;
    line-height: 1.6923em;}

    a {
    color: #09F;}

    h2 {
    font-weight: normal;}

    p {
    margin: 0 0 1.6923em 0;}        

    #container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: auto;}

    #header,
    #content,
    #footer {
    text-align: left;
    width: 870px;
    margin: 0 auto;
    padding: 40px;}

    #header,
    #footer {
    background-color: #eee;}

    #header h1 {
    margin: 0;}

    #header p {
    margin: 5px 0 0;}

    #content {
    background-color: #fff;}		

    /* ---------------------------------------------------------- */
    /* LIGHTBOXES
    /* ---------------------------------------------------------- */
    #lightboxes {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style-type: none;
    text-align: left;
    overflow: hidden;}

    #lightboxes li {
    width: 100%;
    height: 9999px;
    position: relative;
    background: rgba(0,0,0,.5);}

    #lightboxes .box {
    position: absolute;
    width: 400px;
    height: 400px;
    left: 50%;
    top: 50px;
    border: 10px solid #999;
    margin-left: -230px;
    background-color: #fff;
    padding: 20px;}

    #lightboxes h3 {
    font-weight: normal;
    font-size: 1.8461em;
    margin: 0 0 0.4583em 0;}

    #lightboxes a.close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: block;
    width: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #ddd;
    text-decoration: none;
    font-weight: bold;
    color: #999;
    font-size: 1.2em;}

    #lightboxes a.close:hover {
    background-color: #999;
    color: #fff;}

    #lightboxes #close {
    background-color: transparent;
    z-index: -1;}
    &lt;/style&gt;

    &lt;!--[if IE]&gt;
    &lt;style type="text/css"&gt;
    html {
    overflow-y: auto;}

    #lightboxes {
    position: relative;}

    #lightboxes .ie-bg {
    background: #000;
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    filter: alpha(opacity=75);}
    &lt;/style&gt;
    &lt;![endif]--&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="container"&gt;
    &lt;div id="header"&gt;
        &lt;h1&gt;A valid XHTML and CSS Lightbox (no JavaScript)&lt;/h1&gt;
        &lt;p&gt;&lt;strong&gt;by Jenna Smith&lt;/strong&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="content"&gt;
        &lt;h2&gt;Click any of the links below to see it in action&lt;/h2&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur &lt;a href="#lightbox-about"&gt;about us&lt;/a&gt; adipiscing elit.
        Donec massa lorem, elementum et mollis non, viverra a est. Proin nunc orci, tristique at egestas et,
        interdum ac ipsum. Nulla &lt;a href="#lightbox-more"&gt;more info&lt;/a&gt; vulputate erat ac gravida. Mauris facilisis, leo ac condimentum commodo,
        justo eros molestie dolor, a posuere orci tortor sed lacus. Suspendisse dictum, magna eu posuere tempor,
        augue diam tempor lacus, sed hendrerit nulla ante quis justo. Aliquam eget tellus risus.&lt;/p&gt;

        &lt;p&gt;Proin sollicitudin &lt;a href="#lightbox-more"&gt;more info&lt;/a&gt;
        elementum sem id pulvinar. Nunc vitae nulla nunc, at tempor nisi. Vivamus condimentum tempus auctor. Vivamus
        aliquet lorem at mauris rutrum vitae molestie nunc hendrerit. Pellentesque condimentum metus sed mi euismod
        lobortis id sit amet orci. Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
        risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
        Praesent bibendum sagittis elit, nec convallis enim tincidunt quis. Duis vitae risus sed ipsum varius volutpat
        in in tortor. Duis nec est at mi condimentum consequat sed vitae metus. Lorem ipsum dolor sit amet, consectetur
        adipiscing elit.&lt;/p&gt;

        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur &lt;a href="#lightbox-about"&gt;about us&lt;/a&gt; elit. Donec massa lorem,
        elementum et mollis non, viverra a est. Proin nunc orci, tristique at egestas et, interdum ac ipsum. Nulla
        ullamcorper vulputate erat ac gravida. Mauris facilisis, leo ac condimentum commodo, justo eros molestie dolor,
        a posuere orci tortor sed lacus. Suspendisse dictum, magna eu posuere tempor, augue diam tempor lacus, sed
        hendrerit nulla ante quis justo. Aliquam eget tellus risus. Proin sollicitudin elementum sem id pulvinar. Nunc
        vitae nulla nunc, at tempor nisi. Vivamus condimentum tempus auctor. Vivamus aliquet lorem at mauris rutrum vitae
        molestie nunc hendrerit. Pellentesque condimentum metus sed mi euismod lobortis id sit amet orci. Duis eros
        nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non risus dignissim placerat et eu dolor.
        Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt. Praesent bibendum sagittis elit, nec
        convallis enim tincidunt quis. Duis vitae risus sed ipsum varius volutpat in in tortor. Duis nec est at mi
        condimentum consequat sed vitae metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="footer"&gt;
    	&lt;p&gt;Copyright 2009 Jenna Smith&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;ul id="lightboxes"&gt;
    &lt;li id="close"&gt;&lt;/li&gt;
    &lt;li id="lightbox-about"&gt;
        &lt;div class="box"&gt;
            &lt;h3&gt;About&lt;/h3&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;a href="#close" class="close" title="close window"&gt;x&lt;/a&gt;
        &lt;/div&gt;
        &lt;!--[if IE]&gt;
        &lt;div class="ie-bg"&gt;&lt;/div&gt;
        &lt;![endif]--&gt;
    &lt;/li&gt;
    &lt;li id="lightbox-more"&gt;
        &lt;div class="box"&gt;
            &lt;h3&gt;More stuff&lt;/h3&gt;
            &lt;p&gt;
                Duis eros nibh, tempor sed ultricies eget, malesuada id nunc. Praesent a purus non
                risus dignissim placerat et eu dolor. Maecenas rutrum odio vitae libero sagittis a faucibus metus tincidunt.
                Praesent bibendum sagittis elit, nec convallis enim tincidunt quis.
            &lt;/p&gt;
            &lt;a href="#close" class="close" title="close window"&gt;x&lt;/a&gt;
        &lt;/div&gt;
        &lt;!--[if IE]&gt;
        &lt;div class="ie-bg"&gt;&lt;/div&gt;
        &lt;![endif]--&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<h3>Conclusion</h3>
<p>This was just a bit of fun and is unlikely to be used in any real-world applications but hopefully it&#8217;s been an interesting read and you never know, someone might have actually learnt something from it!</p>
<p>So what now? Well, it would be great to see if anyone can come up with a better solution! If you have one, please share.</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=3230&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/design/css/how-to-create-a-valid-non-javascript-lightbox/feed/</wfw:commentRss>
		<slash:comments>82</slash:comments>
		</item>
		<item>
		<title>How to Design a Portfolio Site, Part 2</title>
		<link>http://carsonified.com/blog/design/how-to-design-a-portfolio-site-part-2/</link>
		<comments>http://carsonified.com/blog/design/how-to-design-a-portfolio-site-part-2/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 07:00:52 +0000</pubDate>
		<dc:creator>Elliot Jay Stocks</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://carsonified.com/?p=2072</guid>
		<description><![CDATA[By <strong>Elliot Jay Stocks</strong><br />
Editor&#8217;s Note: Elliot will be doing a talk called &#8220;The Perfect Portfolio Site&#8221; on the FOWD Tour.
This is the second video in our two-part series focusing on how to design a killer portfolio site (feel free to check out Part One).
In Part Two you&#8217;ll learn &#8230;

How to &#8216;design in the browser&#8217;
How to take your design [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fhow-to-design-a-portfolio-site-part-2%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fhow-to-design-a-portfolio-site-part-2%2F" height="61" width="51" /></a></div><p><img src="http://img.skitch.com/20090719-bir73e4f826wkt5krs9dct3khf.jpg" alt="Elliot talking about portfolio design" /></p>
<p><em>Editor&#8217;s Note: Elliot will be doing a talk called &#8220;The Perfect Portfolio Site&#8221; on the <a href="http://events.carsonified.com/fowd/2009/tour/">FOWD Tour</a>.</em></p>
<p>This is the second video in our two-part series focusing on how to design a killer portfolio site (feel free to <a href="http://carsonified.com/blog/design/how-to-design-a-portfolio-site/">check out Part One</a>).</p>
<p>In Part Two you&#8217;ll learn &#8230;</p>
<ol>
<li>How to &#8216;design in the browser&#8217;</li>
<li>How to take your design from Photoshop to HTML and CSS</li>
<li>How to integrate your design into a CMS like WordPress</li>
<li>How to structure your CSS files</li>
<li>How to enrich your design with CSS3</li>
<li>How to use &#8216;custom fields&#8217; in WordPress to make powerful templates</li>
<li>How to use <a href="http://webkit.org/blog/138/css-animation/">Webkit Transistions</a> to add extra beauty to your site</li>
</ol>
<p><span id="more-2072"></span></p>
<h3>30-Minute Screencast</h3>
<p>You can also <a href="http://vimeo.com/5666504">download the hi-res video</a> if you have a <a href="http://vimeo.com">Vimeo</a> account.</p>
<p><object width="471" height="294"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5666504&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=eb6f00&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5666504&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=eb6f00&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="471" height="294"></embed></object></p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=2072&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/design/how-to-design-a-portfolio-site-part-2/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Handy Tips from Tipster</title>
		<link>http://carsonified.com/blog/carsonified/features/handy-tips-to-help-you-out/</link>
		<comments>http://carsonified.com/blog/carsonified/features/handy-tips-to-help-you-out/#comments</comments>
		<pubDate>Fri, 01 May 2009 12:03:29 +0000</pubDate>
		<dc:creator>Ryan Carson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://thinkvitamin.com/?p=1286</guid>
		<description><![CDATA[By <strong>Ryan Carson</strong><br />There have been a ton of helpful and interesting tips posted to Tipster recently, so I thought we&#8217;d pull a few out for you all (and give the submitters a bit of well-deserved publicity).
Topics that we&#8217;re covering are: MySQL, CSS, JavaScript, PHP, JQuery, life hacks and server admin.
MySQL Geo Search
Here&#8217;s a MySQL statement to search [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Ffeatures%2Fhandy-tips-to-help-you-out%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Ffeatures%2Fhandy-tips-to-help-you-out%2F" height="61" width="51" /></a></div><p>There have been a ton of helpful and interesting tips posted to <a href="http://tipster.carsonified.com">Tipster</a> recently, so I thought we&#8217;d pull a few out for you all (and give the submitters a bit of well-deserved publicity).</p>
<p>Topics that we&#8217;re covering are: MySQL, CSS, JavaScript, PHP, JQuery, life hacks and server admin.</p>
<h3><a href="http://tipster.carsonified.com/categories/web-apps/mysql-geo-search/">MySQL Geo Search</a></h3>
<p>Here&#8217;s a MySQL statement to search for nearest objects to you in a database, &#8216;lat&#8217; &amp; &#8216;lng&#8217; are fields in the &#8216;items&#8217; table with the location of object and $latitude &amp; $longitude are the users location. The distance field will be the calculated distance in Km between the user and the object:</p>
<p><code>SELECT *,(((acos(sin((&quot;.$latitude.&quot;*pi()/180)) * sin((`lat`*pi()/180))+cos((&quot;.$latitude.&quot;*pi()/180)) * cos((`lat`*pi()/180)) * cos(((&quot;.$longitude.&quot;- `lng`)*pi()/180))))*180/pi())*60*1.1515*1.609344) as distance FROM `items` ORDER BY distance;<!--formatted--></code></p>
<p>By: <a href="http://mogotion.com/">Sam Machin</a><br />
<a href="http://tipster.carsonified.com/categories/web-apps/mysql-geo-search/">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/css/transparent-background-images-png-fix-for-ie6-a-fe/">Transparent background images &#8211; PNG fix for IE6 &#8211; a few reminders</a></h3>
<p>When using the MS filter (via The AlphaImageLoader) to fix PNG transparency for IE6 — in your CSS, remember to:</p>
<ol>
<li>Set width and height for the element/s containing the transparent background image.</li>
<li>First set background to none — then apply filter for background image.</li>
<li>Apply &#8216;position: relative;&#8217; to any contained links to ensure functionality</li>
</ol>
<p>(Also, bear in mind that the background images can no longer be tiled or positioned via &#8216;background-position&#8217;).</p>
<p>By: <a href="http://eyelearn.org/">Prisca</a><br />
<a href="http://tipster.carsonified.com/categories/css/transparent-background-images-png-fix-for-ie6-a-fe/">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/javascript/address-longitude-and-latitude-in-google-maps/">Address Longitude and Latitude in Google Maps</a></h3>
<p>Google maps does not show the Longitude and Latitude of an address you search. To get this information, enter this piece of JavaScript into you browsers address bar and hit enter:</p>
<p><code>javascript:void(prompt(&#39;&#39;,gApplication.getMap().getCenter()));<!--formatted--></code></p>
<p>A little window will then pop-up displaying the Longitude and Latitude for you. Bingo!</p>
<p>[Editor's note: If you add this to your bookmarks toolbar, it's even easier to use. Just click it whenever you're on Google Maps. Hat tip to <a href="http://kyanmedia.com">Phil Balchin</a>.]</p>
<p>By: <a href="http://www.twitter.com/zoltarSpeaks">Pete Roome</a><br />
<a href="http://tipster.carsonified.com/categories/javascript/address-longitude-and-latitude-in-google-maps/">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/php/custom-details-in-code-hints-zend-studio-for-eclip/">Custom Details in Code Hints &#8211; Zend Studio for Eclipse</a></h3>
<p>Zend Studio is a brilliant platform for PHP development. In my view, well worth the cost. One of the best things about it now being built on Eclipse is the project-wide code hinting.</p>
<p>When you see the built-in code hints and highlight an option, you get loads of lovely details regarding the functions and classes that you are about to use&#8230; as you would expect from most modern IDEs. However, Zend Studio for Eclipse takes this further for your own classes and functions!</p>
<p>When you have written your classes and functions, start placing a multi-line comment just above the opening line, i.e. /**, hit Return and Studio will prompt you for data types and descriptions for your method variables.</p>
<p>This is invaluable in understanding those classes you wrote at 3:47am, 3.5 years ago and haven&#8217;t used since!</p>
<p>By: <a href="http://flipstorm.co.uk/">Simon Hamp</a><br />
<a href="http://tipster.carsonified.com/categories/php/custom-details-in-code-hints-zend-studio-for-eclip/">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/css/use-a-print-stylesheet/">Use a Print Stylesheet</a></h3>
<p>Print stylesheets allow you to change the style of your page when printing, without having to provide a separate &#8220;print version&#8221; of the markup.</p>
<p>You specify a print CSS by adding &#8220;media=&#8217;print&#8217;&#8221; as an attribute to the link tag.</p>
<p><code>&lt;link rel="stylesheet" type="text/css" media="print" href="print.css"/&gt;<!--formatted--></code></p>
<p>In the print CSS you should remove unnecessary elements such as sidebars, menus, background colours, presentational images, etc so as not to waste ink and paper on parts which don&#8217;t need to be printed. You can also change the font and size to make sure the text is clear on the printed page.</p>
<p>You can even add some CSS to show the URLs of links on the page, which wouldn&#8217;t normally be seen when printing.</p>
<p><code>a[href]:after { content: &quot; (&quot; attr(href) &quot;) &quot;; }<!--formatted--></code></p>
<p>By: <a href="http://wblinks.com/">Rich Adams</a><br />
<a href="http://tipster.carsonified.com/categories/css/use-a-print-stylesheet/">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/css/make-your-links-easier-to-read/">Make your links easier to read</a></h3>
<p>Instead of using { text-decoration: underline; } on your links (as browsers do by default) use:</p>
<p><code>{ border-bottom: 1px solid; }.</code></p>
<p>This makes your links easier to read, as there will be more space between the text and the line underneath, so the line will no longer cross through your &#8216;y&#8217;s and &#8216;g&#8217;s.</p>
<p>You can also then style your underline with all the usual border stylings, much more exciting than a plain underline :)</p>
<p>By: <a href="http://laurakalbag.com/">Laura Kalbag</a><br />
<a href="http://tipster.carsonified.com/categories/css/make-your-links-easier-to-read/">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/jquery/manual-filmstrips-in-jquery">Manual filmstrips in jQuery</a></h3>
<p>Really simple manual photo film-strip in jQuery. Used to swap a large image on a page with that of a thumbnail elsewhere on the page, such as different photos of a product in an e-commerce store.</p>
<p><code><br />
$(document).ready(function(){<br />
imageSwapper(&quot;.thumbnails a&quot;);<br />
});<br />
<!--formatted--></code></p>
<p><code><br />
function imageSwapper(link) {<br />
$(link).click(function(){<br />
$(&amp;#039;#largeimage&amp;#039;).attr(&amp;#039;src&amp;#039;, this.href);<br />
return false;<br />
});<br />
};<br />
<!--formatted--></code></p>
<p>Just link the thumbnails to their larger versions and pop them in a div or paragraph of class thumbnails, and give the large image an ID of large image, and you are good to go!</p>
<p>By: <a href="http://www.michaelpeacock.co.uk/">Michael Peacock</a><br />
<a href="http://tipster.carsonified.com/categories/jquery/manual-filmstrips-in-jquery">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/web-apps/store-user-passwords-as-salted-hashes/">Store user passwords as salted hashes</a></h3>
<p>Just using a hash of the user password is not strong enough. If two users have the same password, they&#8217;ll have the same hash. Dictionary attacks are also still possible as the attacker can have a list of dictionary word hashes. Using a salted hash involves generating a random string of characters, which you then concatenate with the password before hashing. Two users with the same password will then have different hashes, and the stored hash will never just be a hash of a common word if the user chose a weak password. You then store the salt, and the hashed value in your database.</p>
<p><code>hash_to_store = sha1(salt + real_pass)</code></p>
<p>There are many different methods you could use too, such as concatenating the salt with a hash of the password and then hashing that, etc.</p>
<p><code>hash_to_store = sha1(sha1(real_pass) + ...</code></p>
<p>By: <a href="http://wblinks.com/">Rich Adams</a><br />
<a href="http://tipster.carsonified.com/categories/web-apps/store-user-passwords-as-salted-hashes/">Vote on this tip</a></p>
<h3><a href="http://tipster.carsonified.com/categories/life-hacks/cddvd-stuck-in-macbook/">CD/DVD stuck in Macbook</a></h3>
<p>Having gotten a DVD stuck inside my Macbook the other day, i found the only way to force eject it was to hold down the trackpad button on reboot. DVD popped right out.</p>
<p>By: <a href="http://www.twitter.com/zoltarSpeaks">Pete Roome</a><br />
<a href="http://tipster.carsonified.com/categories/life-hacks/cddvd-stuck-in-macbook/">Vote on this tip</a></p>
<p>Photo credit: <a href="http://www.flickr.com/photos/mance">flickr.com/photos/mance</a></p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1286&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/carsonified/features/handy-tips-to-help-you-out/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Tables: The Next Evolution in CSS Layout</title>
		<link>http://carsonified.com/blog/design/tables-the-next-evolution-in-css-layout/</link>
		<comments>http://carsonified.com/blog/design/tables-the-next-evolution-in-css-layout/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 16:52:39 +0000</pubDate>
		<dc:creator>Kevin Yank</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Dev]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/css/tables-the-next-evolution-in-css-layout</guid>
		<description><![CDATA[By <strong>Kevin Yank</strong><br />Today, a talented web designer must be a modern-day MacGyver—that 80s TV action hero who could turn a rubber band and three tin cans into a serviceable aircraft. Turning the average site design mockup into a living, breathing slice of HTML and CSS is a comparably delicate miracle, which must be accomplished using whatever makeshift [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Ftables-the-next-evolution-in-css-layout%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Ftables-the-next-evolution-in-css-layout%2F" height="61" width="51" /></a></div><p>Today, a talented web designer must be a modern-day MacGyver—that 80s TV action hero who could turn a rubber band and three tin cans into a serviceable aircraft. Turning the average site design mockup into a living, breathing slice of HTML and CSS is a comparably delicate miracle, which must be accomplished using whatever makeshift tools happen to be lying around in current browsers.</p>
<p>That’s exactly why so many professional designers still choose to use HTML tables for layout. How can we expect beginners to adopt CSS for layout when it takes someone with the resourcefulness (and snappy dress sense) of MacGyver to fully understand the techniques involved?</p>
<p>Thanks to the imminent release of Internet Explorer 8, CSS layout is about to become something <em>anyone</em> can learn to do—no chewing gum or makeshift explosives required.</p>
<h3>HTML Tables Are a 90% Solution</h3>
<p>HTML tables produce the grid-based layouts we want to achieve with relative ease, but the price is that users with screen readers and other technologies that rely on semantic markup have a hard time making sense of the page.</p>
<p>As standards-conscious designers, we have convinced ourselves that the benefits of semantically meaningful markup are worth the added hassle of using CSS for layout. Not everyone shares this conviction. Whenever I write about some new CSS layout technique, at least half the feedback I get boils down to “You’re kidding yourself if you think designers will use that instead of HTML tables.”</p>
<p>The reason this is such a contentious issue is that tables correspond so well to the way designers tend to think of pages: a semi-flexible grid that defines rectangular areas that make up the page. If you want three columns in a row, you just put three table cell tags inside a table row tag:</p>
<p><code>&lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;column 1&lt;/td&gt; &lt;td&gt;column 2&lt;/td&gt; &lt;td&gt;column 3&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;<br />
&lt;/table&gt;</code></p>
<p>The premise of using CSS for layout is sound: replace the HTML tables with semantically meaningful markup, plus semantically invisible div&#8217;s where needed:</p>
<p><code>&lt;div id="container"&gt; &lt;div&gt; &lt;div id="menu"&gt;column 1&lt;/div&gt; &lt;div id="content"&gt;column 2&lt;/div&gt; &lt;div id="sidebar"&gt;column 3&lt;/div&gt; &lt;/div&gt;<br />
&lt;/div&gt;</code></p>
<p>The problem is the CSS code required to lay out this new markup. CSS was not initially designed to support blocks arranged horizontally across the page; consequently, we have had to get creative with the tools at our disposal. Current best practice requires the designer to master subtle interactions like overlapping floats, negative margins, and other black magic to achieve a simple multi-column layout. You don’t so much describe the layout you want as gradually build up a combination of positioning constraints that almost miraculously result in the layout you’re after. You couldn’t come up with a more convoluted way of expressing page layout if you tried!</p>
<p>If CSS layout code were as easy to write as HTML tables, making the leap would be a no-brainer; designers would flock to CSS willingly. Instead, we must drag them kicking and screaming, because the tools that CSS provides are not suited to the layout tasks we want to accomplish.</p>
<p>What if CSS provided a set of tools that applied to practical layout tasks as obviously as HTML tables do?</p>
<h3>Bring the Tables to CSS</h3>
<p>CSS actually includes a feature that works just like HTML tables: <em>CSS tables</em>. Using the CSS <var>display</var> property, you can instruct the browser to format any HTML element as if it were a table. For visual display purposes the element behaves like a table, but the element retains its non-table semantics for screen readers and other tools that look at the HTML markup.</p>
<p>In short, CSS tables let you perform table-based layout without misusing HTML tables!</p>
<p>The CSS to lay out our collection of div&#8217;s above as a row of three table cells is very straightforward:<br />
<code>#container { display: table; border-collapse: collapse; table-layout: fixed;<br />
}<br />
#container &gt; div { display: table-row;<br />
}<br />
#container &gt; div &gt; div { display: table-cell;<br />
}</code></p>
<p>We can then set the widths of each of our columns, again with very straightforward code:</p>
<p><code>#menu { width: 200px;<br />
}<br />
#content { width: 66%;<br />
}<br />
#sidebar { width: 33%;<br />
}</code><br />
From this foundation, applying borders and backgrounds to these columns is trivial. Check out this <a rel="nofollow" href="http://www.thinkvitamin.com/misc/csstables/3col.html" target="_blank">sample page</a>, and the screenshot below for a fully-rendered example. Now <em>this</em> is the kind of page layout code that designers can embrace with confidence!</p>
<p><img src="http://www.thinkvitamin.com/images/articles/csstables/3col.png" alt="a simple page design featuring a three-column layout" width="486" height="350" /></p>
<p>Compared with HTML tables, CSS tables have only one notable weakness: CSS does not allow for table cells to span rows or columns the way they can in HTML tables (with the &#8220;rowspan&#8221; and &#8220;colspan&#8221; attributes). As it turns out, however, this is a relatively uncommon requirement for page layouts; and in the few cases where spans are required, there are ways to fake them with CSS tables.</p>
<h3>Can You Start Now?</h3>
<p>So, why isn’t everyone already using CSS tables for page layout? In an all-too-familiar twist, we have Internet Explorer to blame. CSS tables are supported in every major browser <em>except</em> Internet Explorer. However, the good news is that Internet Explorer 8 will have full support for CSS tables upon its release, setting the stage for CSS tables to become the preferred tool for page layout on the web!</p>
<p>The question you must ask yourself is, “When can I start making the switch?” The answer may depend on the type of site you work on.</p>
<p>If you work professionally on a mainstream website, chances are you will be expected to keep your site working on Internet Explorer 6 and 7 for some time to come. Since neither of these browsers support CSS tables, it may seem on the surface that you’re out of luck. In fact, CSS tables may still make your job easier.</p>
<p>Because CSS tables are <em>so</em> much easier to work with than previous CSS layout techniques, you may find it worthwhile to implement your design first using CSS tables, and then using older CSS techniques for IE6 and IE7. You can use conditional comments to insert your IE6/IE7 style sheet, while all other browsers will only get the table-based layout. This approach does mean you have to implement your layout twice, but it saves you the considerable headache of getting the older techniques from working both in Internet Explorer <em>and</em> in other browsers.</p>
<p>While you’re at it, you may find opportunities to simplify the layout slightly in the IE6/IE7 version of the site, and save yourself a lot of work. Something like not insisting that a column’s background color extend all the way to the bottom of the page can radically simplify the code, for example.</p>
<p>If you work on a site with a more technical audience, or owned by a more progressively-minded organization, you might have even more wiggle room. In this case, you should explore the possibility of providing a simplified page layout for IE6 and IE7. </p>
<p><img src="http://www.thinkvitamin.com/images/articles/csstables/sidebyside.png" alt="A simplified, two-column layout is visible in the IE6 window." width="486" height="423" /></p>
<p>If you find yourself having to defend this approach to a client, tell them how much of your time (and their money) will be saved by simplifying the layout a little in outdated browsers.</p>
<p>Even if you can’t justify working with CSS tables in your day job just yet, it’s worth finding excuses to use them where you can. When Internet Explorer 5.5 made CSS layout across browsers possible for the first time, Jeffrey Zeldman wrote <a id="tohell" rel="nofollow" href="http://www.alistapart.com/stories/tohell/" target="_blank"><cite>To Hell With Bad Browsers</cite></a>, leading the call for designers to adopt CSS layout:</p>
<blockquote><p>“For years, the goal of a Web that was accessible to all looked more like an opium dream than reality. Then, in the year 2000, Microsoft, Netscape, and Opera began delivering the goods. At last we can repay their efforts by using these standards in our sites. We encourage others to do the same.”</p></blockquote>
<p>The response to this call to action was gradual, but effective. Initially, web designers began experimenting with CSS layout on their personal sites, before testing the waters with some of their riskier side projects. Major mainstream sites like <a rel="nofollow" href="http://devedge-temp.mozilla.org/viewsource/2003/espn-interview/01/index_en.html" target="_blank">ESPN began making the switch</a> only a couple of years later.</p>
<p>With Internet Explorer 8 on the verge of release, the stage is set for another wave of change to sweep the Web, however gradually. Now is the time to ensure you’re on the leading edge, not paddling to catch up!</p>
<h3>Everything You Know About CSS Is Wrong</h3>
<p>Perhaps the most important benefit of CSS tables is that it finally makes page layout with CSS easy to learn. Finally, we can justifiably expect <em>anyone</em> designing a web site today to do it the right way, with a proper separation of content (HTML) and presentation (CSS).</p>
<p>In my just-released book, <a rel="nofollow" href="http://www.sitepoint.com/books/csswrong1/" target="_blank"><cite>Everything You Know About CSS Is Wrong</cite></a> (available from Amazon: <a rel="nofollow" href="http://www.amazon.com/gp/product/0980455227?ie=UTF8&amp;tag=vitamin06-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0980455227" target="_blank">Everything You Know About CSS is Wrong!</a><img style="border:none !important;margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=vitamin06-20&amp;l=as2&amp;o=1&amp;a=0980455227" border="0" alt="" width="1" height="1" />), Rachel Andrew of <a rel="nofollow" href="http://www.webstandards.org/" target="_blank">The Web Standards Project</a> and I explore the realities of page layout with CSS tables, the new possibilities they open up, and how to work around limitations like the lack of row and column spans. A brisk read, it provides a valuable glimpse into the next evolution in CSS layout on the web.</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1796&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/design/tables-the-next-evolution-in-css-layout/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Stay on :target</title>
		<link>http://carsonified.com/blog/dev/stay-on-target/</link>
		<comments>http://carsonified.com/blog/dev/stay-on-target/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 09:00:34 +0000</pubDate>
		<dc:creator>Brian Suda</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/css/stay-on-target</guid>
		<description><![CDATA[By <strong>Brian Suda</strong><br />In this article, I want to introduce you to a really powerful CSS3 pseudo selector called :target. Much like :hover, :target is invoked during certain interactions with the website. Specifically, when applied to a fragment identifier. On a page such as http://example.com/index.html#hello-world, the id=”hello-world” element is the target and any matching :target styles would be [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fstay-on-target%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdev%2Fstay-on-target%2F" height="61" width="51" /></a></div><p>In this article, I want to introduce you to a really powerful CSS3 pseudo selector called :target. Much like :hover, :target is invoked during certain interactions with the website. Specifically, when applied to a fragment identifier. On a page such as http://example.com/index.html#hello-world, the id=”hello-world” element is the target and any matching :target styles would be applied.</p>
<p>I am going to demonstrate two examples of when and how :target can be used. Hopefully, this introduction will get you thinking about some of simple ways :target can add benefit your customers.</p>
<h3>Tabs in CSS</h3>
<p>A well structured document is one that makes sense in the ordering of sections and topics. It works well when there is no CSS and no JavaScript. Tabbed systems make use of some sort of display tab which shows the current section, and in doing so hides the other sections. We’ve all seen a tabbed system before, and probably  plenty of poor implementations as well. Sometimes when you click the tab, it calls a JavaScript function to populate the area below the tab. The downside is that when there is no JavaScript the data does not appear.</p>
<p>The ideal way to build a tab system is to have all your data in the HTML, then use JavaScript to hide the other tab panes and build the tabs themselves dynamically. That way if there is no JavaScript, it just defaults to a linear set of text blocks. This is progressive enhancement; build for the lowest common denominator and add more functionality and styling as you go — no one is left behind, not even googlebot.</p>
<p>Instead of using JavaScript to do this show/hide, it is possible to use CSS3 using the :target selector. Before you get too excited, it must be said that the :target selector is not supported in IE6 or IE7, so the practical uses for this are pretty slim. Instead this can be used for user chrome type objects which don’t effect functionality, but improve usability. You can add the :target info today, and when browsers implementations catch-up they get the bells and whistles auto-magically. It is important to <strong>not</strong> use :target for mission critical things, but there are plenty of other possibilities. As an example, I will show you how make a simple tab system based on <a href="http://daniel.glazman.free.fr/weblog/targetExample.html#general">Daniel Glazman’s example</a>.</p>
<p>First we should create the basic un-styled HTML.<br />
<code><br />
&lt;h2 id="topic1"&gt;&lt;a href="#content1"&gt;Topic 1&lt;/a&gt;&lt;/h2&gt;<br />
This is the text for topic 1. Hello World!<br />
&lt;h2 id="topic2"&gt;&lt;a href="#content2"&gt;Topic 2&lt;/a&gt;&lt;/h2&gt;<br />
Different text for topic 2. Ah, foobar.<br />
</code><br />
Without CSS or JavaScript this text is completely accessible and reads normally, it just makes the page longer. Tabs are a way to compact the information into a smaller space, so lets proceed to do this.</p>
<p>If we add some simple styles to the page, we can get the two headings to appear and act like tabs through positioning. The interesting part is the :target selector.</p>
<p><code>// set the default state first<br />
p {<br />
  display: none;<br />
}</p>
<p>// When the link is clicked, set the contents to display<br />
p:target {<br />
  display: block;<br />
}<br />
</code></p>
<p>When the fragment (#content1) is not part of the URL, the :target selector does not match the</p>
<p>element, so it is set the default view of display: none. This is a very simple way to create a tabbed system. You can view a <a title="CSS3 tab example" href="/downloads/css3/tabExample.html#content1">working example</a> and see for yourself.</p>
<h3>The Yellow Fade Technique</h3>
<p>There is a popular usability feature called the “Yellow Fade Technique”. This is used to direct the user’s attention back to a specific area subtly. For example, when you want to edit a piece of a page you may click edit which takes to a new page with form fields. When you press save you are returned to the original page where there is a brief yellow fade of the area that was just edited. It brings your eye to the area, possibly to confirm the changes look correctly in the template, or to just make people aware the change took place at all. Either way, it seems to be a welcomed usability feature that has been picked-up by several web applications.</p>
<p>Normally, this is accomplished through the use of JavaScript and page IDs or classes. The JavaScript runs an onload function looking for those classes or ID and once the parts of the page have been identified, the script runs a timer and ever few microseconds change the background color from pure yellow to white. This create a smooth, not too annoying, yellow fade effect.</p>
<p>The downside to all this is that there are several resources at work, including onload functions (which might be happening <strong>every</strong> time the page loads, not just the times when a form is submitted) and hooks into the classes and IDs and JavaScript timers. All this adds to the client download and subtracts from the speed of the page.</p>
<p>With CSS3 there is a much easier and simpler solution. Using the :target pseudo class it is possible to emulate the yellow fade without a single line of JavaScript.</p>
<p>First, you need to create (or <a title="download yellow fade gif" href="/downloads/css3/yellow-fade.gif">download</a>) a tiny 1 pixel-wide yellow animated gif. This will fade from yellow to white. The animated gif isn’t repeating, so it will fade once and then stay pure white. This also defines the length of the fade, so there is no need to for a JavaScript timer.</p>
<p>Second, we need to set this as the background image for the area which has been changed. To do this, we use the CSS3 :target pseudo selector.</p>
<p><code>#here:target {<br />
  background-image: url('yellow-fade.gif');<br />
}<br />
</code></p>
<p>This will fade the element with an id=”here”, the URL would look like http://example.com/#here. It is good web architecture to use fragment identifiers for each of your headings and to use <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">RESTful URLs</a>.</p>
<p>Now, the downside to that CSS statement is that it will only fade the area with the ID.</p>
<p><code><br />
&lt;h1 id="here"&gt;Hello World&lt;/h1&gt;<br />
I am saying Hello to everyone in the World!</code><br />
Only the heading element would get the yellow fade. So how do we fix this? Well, we could change the ID to a class and create something like:<br />
<code>.here:target {<br />
  background-image: url('yellow-fade.gif');<br />
}</code><br />
But then on the server, we’d have to add classes dynamically to all our elements.<br />
<code><br />
&lt;h1 class="here"&gt;Hello World&lt;/h1&gt;<br />
I am saying Hello to everyone in the World!</code><br />
We could put a wrapper around both the heading and the paragraph.<br />
<code><br />
&lt;div id="here"&gt;<br />
&lt;h1&gt;Hello World&lt;/h1&gt;<br />
I am saying Hello to everyone in the World!<br />
&lt;/div&gt;<br />
</code><br />
But that seems too much work. Instead, we can make use of another CSS combinator, the adjacent sibling selector:<br />
<code>#here:target, #here:target p {<br />
  background-image: url('yellow-fade.gif');<br />
}</code><br />
This targets both the heading with the ID ‘here’ and the first sibling paragraph. So both will get the background image and the subsequent fade. You can easily change your CSS to fit your HTML design, but this is a quick and simple alternative to the Yellow Fade technique in JavaScript used on so many sites.</p>
<p>In CSS there is also a wildcard * to stand for all nodes. So you could further take the example to<br />
<code>#here:target, #here:target * {<br />
  background-image: url('yellow-fade.gif');<br />
}</code><br />
This would match the first sibling of #here no matter what the type of element it might be. Firefox correctly supports this, but as of writing, Safari does not.</p>
<p>You can see an <a title="Yellow fade example" href="/downloads/css3/fadeExample.html">example of this in action</a> and view the source to see how it all works.</p>
<h3>Blurring the lines between behaviour and presentation</h3>
<p>I am obligated by the behaviorists to mention that there is a debate over presentation and behavior, where does one stop and the other start? By adding the :target selector into your CSS, you are styling the HTML based on the behavior of the browser and the users. We talk about the “holy trinity” of web design, and we have spent the last few years campaigning to divide data, presentation and behavior into their respective HTML, CSS and JavaScript camps. The :target, as well as the :hover, selectors blur that line between presentation and behavior. Depending on how comfortable or how much of a purist you are, you may or may not agree with what has been demonstrated.</p>
<p>These examples were written to better understand the CSS3 :target element and to explore those blurry grey-areas. Hopefully, a discussion will emerge with even more ideas, caveats and problems that were not originally thought of. Together we can create some best practices on when to best use CSS behavior and JavaScript presentation.</p>
<h3>Conclusion</h3>
<p>Over a year ago, Andy Budd demonstrated the yellow-fade technique with :target and I was impressed! (<a href="http://www.andybudd.com/presentations/css3/">http://www.andybudd.com/presentations/css3/</a>) In the time in between, I have seen very little attention or articles on this little known selector. As I was started working on this article, I found several examples some from as early as January 2003 that talk about uses for the :target selector. The reason for not getting the traction it deserves could be the lack of information about when and how to use it correctly or documentation on the poor CSS3 implementations in browsers.</p>
<p>CSS3 is closer than you think, many of the selectors and attributes are available in several major browsers today. They can be used with progressive enhancement to add more style to your design at little cost, when other browsers catch-up they get the benefits of your progressive code for free. The CSS3 :target selector is just one example of some of the new selectors arriving that can be taken advantage of in interesting new ways.</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1771&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/dev/stay-on-target/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Creating Sexy Stylesheets</title>
		<link>http://carsonified.com/blog/carsonified/features/creating-sexy-stylesheets/</link>
		<comments>http://carsonified.com/blog/carsonified/features/creating-sexy-stylesheets/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 12:50:34 +0000</pubDate>
		<dc:creator>Jina Bolton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[commenting]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[sexy stylesheets]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/design/creating-sexy-stylesheets</guid>
		<description><![CDATA[By <strong>Jina Bolton</strong><br />Lately, I have taken interest in discussing methods of creating sexy stylesheets. While CSS can be used to create sexy websites, writing CSS can actually be an artform by itself. The way in which CSS is created, structured, and maintained can be a thing of beauty.
So how does one create sexy stylesheets? What characteristics would [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Ffeatures%2Fcreating-sexy-stylesheets%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Ffeatures%2Fcreating-sexy-stylesheets%2F" height="61" width="51" /></a></div><p>Lately, I have taken interest in discussing methods of creating sexy stylesheets. While CSS can be used to create sexy websites, writing CSS can actually be an artform by itself. The way in which CSS is created, structured, and maintained can be a thing of beauty.</p>
<p>So how does one create sexy stylesheets? What characteristics would your stylesheets have?</p>
<p>A few months ago, I had the opportunity to present on this very topic at <a href="http://webvisionsevent.com/">Web Visions</a> 2007 conference in Portland, Oregon. In preparing my presentation, I surveyed twelve people who work in web design and development. The results of this survey, combined with my own work experiences helped me to compile a list of essentials to remember when creating stylesheets.</p>
<h3>01. Keep CSS out of the markup.</h3>
<p>Linking and/or importing stylesheets would seem to be a no-brainer to the intermediate or advanced CSS developer, but I want to stress why this is so important. I&rsquo;ve seen many sites start out with clean, well-organized CSS files but then get littered as time goes by, with embedded or even inline styles (due to fast updates needed on short deadlines, or possibly sometimes even pure laziness).</p>
<p>Imagine that you are working on an extremely large-scale website with hundreds of ways content can appear. You have fast deadlines, so you opt for making &ldquo;quick fixes&rdquo; or updates by using embedded or inline CSS. Years go by, and this habit continues&#8230; Until one day you&rsquo;re told the site is being completely redesigned (but all the content is to remain the same), and you only have a week to build it (including testing).</p>
<p>Normally, this would have been a fairly simple task of updating the stylesheet(s). Except you have years worth of &ldquo;quick fixes&rdquo; scattered throughout the site â€” and no way to remember where they all are. So now you have to either a) find a way to clean everything up and get everything styled for the redesign in one week (Good luck!), or b) find a new job.</p>
<p>Don&rsquo;t make your job harder than it really has to be. Linking and/or importing your stylesheets is not optional. Create it clean, keep it clean, and you&rsquo;ll be much happier.</p>
<p>NOTE: Be careful of adding too many linked and/or imported stylesheets in your markup. If you&rsquo;re tempted to create a new stylesheet every time you make an update or add new content, you&rsquo;re not doing yourself any favors. Excessive linking and/or importing can make bug-fixing difficult, and make your styles harder to maintain. It is understandable to want separate stylesheets for different sections or components for larger websites (I&rsquo;ll go more into that later). Just be careful that you don&rsquo;t go overboard.</p>
<p>It is worth mentioning that linking too many stylesheets requires additional HTTP requests, which can add up, and <a href="http://developer.yahoo.com/performance/rules.html#num_http">potentially hinder performance</a>. Also, <a href="http://www.juniper.net/security/auto/vulnerabilities/vuln3394.html">Microsoft Internet Explorer 6 has a limit</a> of 32 linked stylesheets.</p>
<h3>02. Semantics is not just a buzz word.</h3>
<p>You know I have to bring it up; semantics are your best friend. Beyond choosing the most appropriate, meaningful elements to describe your content, make sure also that you&rsquo;re choosing <a href="http://www.stuffandnonsense.co.uk/archives/whats_in_a_name_pt2.html">semantic class and ID attribute values</a>. Besides being the &ldquo;right thing to do,&rdquo; it really does make your life easier (and it makes the lives of your fellow team members easier too&#8211; if you working as part of a team). Take a look at the following rule:</p>
<pre><code>.l13k { color: #369; }</code></pre>
<p>If you were new to the job, and you saw that in the CSS file, are you going to know right away what that class is for? Most likely not. This class name could be an abbreviation for something, but there&rsquo;s no real way you can tell right off the bat. Alternatively, maybe you put it there, so you know what it means, right? Today. But will you know what it means three years from now?</p>
<p>Now, let&rsquo;s take a look at this rule:</p>
<pre><code>.left-blue { color: #369; }</code></pre>
<p>You might immediately know what purpose this class selector serves as you know exactly where the left-side blue module appears. So it would appear that this works. Until along comes that redesign you have to build in a week, as I mentioned earlier. In the redesign, this module is now to be positioned on the right, and colored red. The class attribute values no longer makes any sense, so now you have to either change all your attribute values, or leave it as it is (which could lead to mass confusion).</p>
<p>It is always best to refrain from using colors (either the color name or its hex value) or width/height dimensions in your class attribute values. You should also avoid any attribute values that are presentational (such as &ldquo;box&rdquo;).Presentational attributes defeat the purpose of separating presentation from content.</p>
<p>Finally, let&rsquo;s look at this more appropriately named rule:</p>
<pre><code>.product-description { color: #369; }</code></pre>
<p>Here you can see that the rule styles product descriptions, no matter how many times your design changes. Clarity is a beautiful, beautiful thing.</p>
<h3>03. Take advantage of commenting.</h3>
<p>Commenting your CSS files can be a great deal of help to you and others during development if you use comments in creative and meaningful ways. At the most basic level comments provide little reminders why a certain rule is used. But you can use comments to really help improve organization and efficiency.</p>
<p><strong>Reminders and notes</strong></p>
<p>The common approach for commenting, leaving reminders and notes for yourself and other developers can help avoid confusion later. Keep these brief and simple. For example:</p>
<pre><code>
/* Turn off borders for linked images */
img { border: 0; }
</code></pre>
<p><strong>Time stamp and signature</strong></p>
<p>Some designers and developers also note the date and time that the CSS file was last updated, along with their name or initials. This information can provide a quick indicator of who to contact, as well as how up-to-date the file is.</p>
<pre><code>
/* Sushimonster Typography Styles
   Updated: Thu 10.18.07 @ 5:15 p.m.
   Author:     Jina Bolton
   ----------------------------------------------------*/
</code></pre>
<p>Depending on the project, this can be a good idea, particularly if you are working on a team. Keep in mind that some organizations require leaving this type of information out (some companies prefer to keep names and dates out of files), so it is best to find out if there is a mandate on this sort of thing.</p>
<p><strong>Organization</strong></p>
<p>It&rsquo;s a good idea to use comments to indicate the different sections within a CSS file. For example, if all header styles are grouped together, you can use a comment to section these styles off from the next section&rsquo;s styles:</p>
<pre><code>
/* HEADER
   ----------------------------------------------------*/
</code></pre>
<p>I&rsquo;ll go more into this a little later, when discussing &ldquo;Separating style types.&rdquo;</p>
<p><strong>Comment flagging</strong></p>
<p>If you have your CSS file organized into sections as I described above, comment flagging can also be useful to make it easier using FIND to skip down or up to the parts of the file you want to see. You can use a character (such as an equal sign [=]), along with a keyword (typically the name of the section, such as &ldquo;HEADER&rdquo;) to provide &ldquo;anchors&rdquo; in your CSS file:</p>
<pre><code>
/* =HEADER
   ----------------------------------------------------*/
</code></pre>
<p>This is particularly useful in long and complex stylesheets. <a href="http://www.stopdesign.com/log/2005/05/03/css-tip-flags.html">You can read more about this at Stop Design</a>.</p>
<p><strong>Reference</strong></p>
<p>A less common, but nonetheless useful approach is to use comments as reference guide. One example of this might be to include a color guide as you can see in <a href="http://orderedlist.com/">Steve Smith&rsquo;s</a> CSS file:</p>
<pre><code>
/* COLORS
   Body Background:       #2F2C22
   Main Text:             #B3A576
   Links:                 #9C6D25
   Dark Brown Border:     #222019
   Green Headline:        #958944
*/
</code></pre>
<p>You should place this guide at the top of your CSS file to help you remember what color values you use throughout your site. Another example is of an index-like approach. Here you can define different sections so that you can jump down to them (perhaps by using comment flagging). Here&rsquo;s one example:</p>
<pre><code>
/* GENERIC
   HEADER
   SIDEBAR
   FORMS
   TABLES
   FOOTER
*/

/* =GENERIC
   ----------------------------------------------------*/
</code></pre>
<h3>04. Know when to use conditional comments or hacks.</h3>
<p>There are many articles regarding the <a href="http://tantek.com/log/2005/11.html">problem with hacks</a>, and why <a href="http://www.456bereastreet.com/archive/200510/stop_using_css_hacks_now/">Conditional Comments are a better way</a> to handle Internet Explorer issues. Then there are <a href="http://meiert.com/en/blog/20070201/why-conditional-comments-are-bad-repeat-bad/">articles that say otherwise</a>. While I agree that Conditional Comments can be a much better solution than littering your CSS file with hacks, only recently have I come to realize there are instances where they are actually not the most appropriate solution.</p>
<p>Imagine that you want to set a minimum height for an element. The IE6 developers did not implement min-height, so you know that you can use height, which will be treated the same way. Does it make sense to create a whole new stylesheet, and inject it by way of Conditional Comments in your markup, when all you need is this one rule? Would it make better sense to keep the min-height and height rules together, and opt for a small &ldquo;hack&rdquo; within the same CSS file? In this case, I would consider it less efficient to use Conditional Comments.</p>
<p>Another thing to consider: if you have multiple places that your styles are located, using multiple CSS files and Conditional Comments can make your debugging process more difficult. Also, if you need to alter something (perhaps the min-height value in the above-mentioned scenario), you have to open more than one file to make this change. In many cases, this may not be such a big deal for you, but imagine if you have something defined in your main CSS file, and then redefined in 3 different IE stylesheets. That could turn out to be a hassle later down the road, especially if another developer making the edit doesn&rsquo;t realize that these overrides exist.</p>
<p>If you do use Conditional Comments, I recommend leaving a comment in your main stylesheet letting you or a fellow developer know that an IE-specific rule exists. That way when you have to edit a height or something of that nature, you know that you have more than one file to open.</p>
<p>As always, if you do use hack, remember that browser updates can change what works later down the road, and the hack you use now may not work later versions.</p>
<h3>05. Organizing selectors and declarations</h3>
<p>Always, always keep your CSS clean and organized. I prefer organizing my selectors by style groups:</p>
<ul>
<li>reset styles</li>
<li>typography styles</li>
<li>layout styles (header, content, footer, etc.)</li>
<li>module or widget styles</li>
<li>etc.</li>
</ul>
<p>Then, within each of those groups, I organize selectors by DOM hierarchy (working down the page, from the outside in):</p>
<ul>
<li>any parent styles (containing elements, working outside-in)</li>
<li>block-level element styles (paragraphs, lists, etc.)</li>
<li>inline element styles (links, abbreviations, etc.)</li>
<li>etc.</li>
</ul>
<p>Then within those, I work by element types:</p>
<ul>
<li>paragraphs</li>
<li>blockquotes</li>
<li>addresses</li>
<li>lists</li>
<li>forms</li>
<li>tables</li>
<li>etc.</li>
</ul>
<p>Finally, I prefer to organize my CSS declarations by style type:</p>
<ul>
<li>positioning (with coordinates) styles</li>
<li>float/clear styles</li>
<li>display/visibility styles</li>
<li>spacing (margin, padding, border) styles</li>
<li>dimensions (width, height) styles</li>
<li>typography-related (line-height, color, etc.) styles</li>
<li>miscellaneous (list-style, cursors, etc.) styles</li>
</ul>
<p>Some people like to organize declarations alphabetically. It doesn&rsquo;t make sense to me, but it might make perfect sense to you. Whichever method you choose, stick with it, and be consistent.</p>
<h3>06. Creating a framework</h3>
<p>When it comes to developing CSS, If you find yourself doing the same things repeatedly, it is a good idea to consider <a href="http://www.alistapart.com/articles/frameworksfordesigners">creating a library or framework</a>. A framework can be made up of a group of stylesheets that act as a foundation for your site, and help speed up your development time. Typical stylesheets you may find in your framework might include:</p>
<ul>
<li>screen.css &#8211; A screen CSS file can either have all your styles you want to be used for on screen, and/or can import additional styles, such as the following:
<ul>
<li>reset.css &#8211; A reset CSS file can be used to &ldquo;reset&rdquo; all the default browser styling, which can help make it easier to achieve cross-browser compatibility.</li>
<li>typography.css &#8211; A typography CSS file can define your typefaces, sizes, leading, kerning, and possibly even color.</li>
<li>grid.css &#8211; A grid CSS file can have your layout structure (and act as the wireframe of your site, by defining the basic header, footer, and column set up).</li>
</ul>
<li>print.css &#8211; A print CSS file would include your styles you want to be used when the page is printed.</li>
</ul>
<p>One example of a framework is the <a href="http://code.google.com/p/blueprintcss/">Blueprint framework</a> put together by <a href="http://bjorkoy.com/">Olav BjÃ¸rkÃ¸y</a> (which based itself off of work developed by authors including <a href="http://jeffcroft.com">Jeff Croft</a> and <a href="http://meyerweb.com">Eric Meyer</a>). Another popular framework can be found at the <a href="http://developer.yahoo.com/yui/">Yahoo! User Interface Library</a>. Many developers do feel that these pre-built frameworks contain markup and CSS that are a bit â€œbloatedâ€ and also that they contain presentational class attribute names.</p>
<p>NOTE: As I was writing this article in its draft stages, Jeff Croft released the post <a href="http://www2.jeffcroft.com/blog/2007/nov/17/whats-not-love-about-css-frameworks/">What&rsquo;s not to love about CSS frameworks?</a>, in which <a href="http://www2.jeffcroft.com/blog/2007/nov/17/whats-not-love-about-css-frameworks/#c24117">he mentions in the comments</a> he was told that people think I am strongly against frameworks. I&rsquo;m not sure where this came from, but as <a href="http://www2.jeffcroft.com/blog/2007/nov/17/whats-not-love-about-css-frameworks/#c24064">I stated in my response</a>, I am not against CSS frameworks, and am very much for them.</p>
<p>For the best results, I recommend that you create your own framework that works best for you or your organization.</p>
<h3>07. Balance readability and optimization.</h3>
<p>Styles in formatting vary from developer to developer. Some developers use formatting styles that offer great readability, and then optimize the files (removing comments, spaces, tabs, carriage returns, etc.) before pushing the file live. This is a great technique and one I would recommend (done carefully). However, if you are somehow in a situation where you can&rsquo;t really go through those steps, try to find a style that balances readability and optimization. <a href="http://orderedlist.com/articles/single-line-css">Steve Smith has a great suggestion</a> that offers a little bit of both.</p>
<p>Also, consider using hyphens instead of underscores. <a href="http://microformats.org/">Microformats</a> use hyphens as a standard separator, and certain older browsers have a hard time with them. You can read more about this at <a href="http://developer.mozilla.org/en/docs/Underscores_in_class_and_ID_Names">Underscores in class and ID Names</a>.</p>
<h3>08. Master your text editor.</h3>
<p>Just as an artist has proper tools they know well, it&rsquo;s important for a designer/developer to know the tools they use well. For CSS, that would be the editor you are using.</p>
<p>There are many text editors to choose from: TextMate, Coda, BB Edit, TextPad, DreamWeaver, etc. I&rsquo;m not here to tell you which one to pick; they all have their pros and cons, and the right editor for you is up for you to decide. However, once you have decided on a text editor, make sure you learn everything you can about it. Find out what the shortcuts are, and learn all the tips and tricks you can.</p>
<p>Mastering your text editor is the best way to speed up your development time, and help you be more much more efficient when creating sexy stylesheets.</p>
<h3>09. Use version control.</h3>
<p>Smoother maintainability is also an important part of creating sexy stylesheets. This is where <a href="http://en.wikipedia.org/wiki/Revision_control">version control</a> can be your best friend. It&rsquo;s not only helpful for teams, but it can be a lifesaver even for the sole designer/developer.</p>
<p>Some applications have built-in mechanisms for source control. DreamWeaver uses a check-in/check-out system (that can help make sure that a developer doesn&rsquo;t edit a file that is already currently being edited), as well as synching capabilities (which lets you sync and merge your local files with your remote files, or vice versa). This can be very handy, but are somewhat limited.</p>
<p>Subversion (SVN) or Concurrent Versions System (CVS) are great tools to use for more robust management, with additional options, like being able to revert, view changes (which is extremely helpful for teams â€” you can track who added/edited/removed code and when they did it), and resolving conflicts. There&rsquo;s a <a href="http://snook.ca/archives/servers/hosted_subversion/">great article by Jonathan Snook, called &ldquo;Hosted Subversion&rdquo;</a> you can read for more information on how to set this up quickly and easily.</p>
<h3>10. Create and maintain a style guide.</h3>
<p>While in some cases, a style guide is an author&rsquo;s guide with grammar rules and writing standards, it can also be used to outline standards for design, development, and content. A style guide is a great way to have a reference manual that can clarify rules on typography, grid, color, image sizes, etc.</p>
<p>When creating a style guide, it is a great idea to provide reference for the markup and CSS. This reference can be used as a handbook for the development team and future developers. It can include defined layouts, in which you can list the different layouts that can be used, and provide the associated markup and styles.</p>
<p>Finally, you can also leave steps for quality assurance for developers, (such as checking validation and accessibility) to ensure the highest quality.</p>
<h3>Conclusion</h3>
<p>Being an expert in CSS is so much more than having advanced CSS skills (i.e.: fully understanding the cascade, the box model, and how browsers work). I encourage you to think about ways you can constantly and consistently improve maintainability and efficiency. Think beyond what is designed in the comp, even if that is all that you have been provided. Make the CSS intelligent and plan for the future. Overall elegance in workflow is essential to master.</p>
<p><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1768&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/carsonified/features/creating-sexy-stylesheets/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Ensuring your HTML Emails Look Great and Get Delivered</title>
		<link>http://carsonified.com/blog/design/ensuring-your-html-emails-look-great-and-get-delivered/</link>
		<comments>http://carsonified.com/blog/design/ensuring-your-html-emails-look-great-and-get-delivered/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 09:00:31 +0000</pubDate>
		<dc:creator>David Greiner</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[html emails]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[newsletters]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/design/ensuring-your-html-emails-look-great-and-get-delivered</guid>
		<description><![CDATA[By <strong>David Greiner</strong><br />Boy what a difference 18 months can make! In my last Vitamin article I was singing the praises of standards based email and encouraging the use of CSS in your email designs. While the browser market has continued to strive for better standards support, a major player in the email industry has unfortunately done the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fensuring-your-html-emails-look-great-and-get-delivered%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fensuring-your-html-emails-look-great-and-get-delivered%2F" height="61" width="51" /></a></div><p>Boy what a difference 18 months can make! In <a href="http://www.thinkvitamin.com/features/design/html-emails">my last Vitamin article</a> I was singing the praises of standards based email and encouraging the use of CSS in your email designs. While the browser market has continued to strive for better standards support, a major player in the email industry has unfortunately done the opposite.</p>
<p>With the release of Outlook 2007 earlier this year using the Word rendering engine instead of Internet Explorer, my recommendations just don&rsquo;t make the cut any more. I&rsquo;ve decided to revisit my original suggestions and bring them more in line with today&rsquo;s baseline. I&rsquo;ve also had a good look at the feedback and comments from the original post. Getting your email to look good is only one piece of the puzzle, so I&rsquo;ve dedicated the second half of this article to recommendations on how you can improve the chances of your emails actually getting delivered. </p>
<h3>Some things change, some stay the same</h3>
<p>While the best way to code your email might have changed, a number of key email design fundamentals haven&rsquo;t changed a bit. My <a href="http://www.thinkvitamin.com/features/design/html-emails">original article</a> focused on the importance of designing for images being turned off and making sure your design looks good in the preview pane. Not only are these notions still relevant, they&rsquo;re more important than ever with more and more email clients using preview panes and blocking images by default.</p>
<p>In the last 18 months we&rsquo;ve seen the new version of Hotmail, known as Windows Live Hotmail and the new Yahoo! Mail sport a preview pane layout that blocks images by default for unknown senders.</p>
<p>In terms of image blocking, it&rsquo;s safe to assume that at least half of your recipients will receive your email without any visible images. Because of this, it&rsquo;s still important to ask your recipients to add you to their contacts/safe senders list when they subscribe (and in each email subsequent email you send), which often results in your images being turned on by default.</p>
<p>On top of image blocking and preview panes, my other recommendations on essential content, the importance of testing and key things to avoid all still apply. If you haven&rsquo;t done so already, make sure you <a href="http://www.thinkvitamin.com/features/design/html-emails">check out these suggestions</a>.</p>
<h3>Learning to love inline CSS</h3>
<p>You might ask why an update to only one particular email client might change my entire position on using CSS in email. That one&rsquo;s easy. Outlook commands more than two thirds of the business email market. Admittedly, not everyone will have upgraded to the 2007 version so far, but many more will. Add the imperfections of Hotmail and Gmail to the mix and it becomes difficult to justify sending a garbled email to so many of your subscribers.</p>
<p>No need to throw the baby out with the bathwater though. CSS still has an important role to play, albeit in its non-semantic inline form &mdash; but it works. For example:</p>
<pre><code>&lt;p style=&rdquo;font-family:Arial; font-weight:bold;
font-size:11px; color:#060;&rdquo;&gt;Look ma, no semantics!&lt;/p&gt;</code></pre>
<p>I know many of you probably cringe at the thought of this, but if you&rsquo;re looking to get any kind of design consistency across the major email environments, it&rsquo;s your best option. Not <em>all</em> CSS is supported though, you&rsquo;re actually working with a limited subset. Here&rsquo;s an outline of <a href="http://www.campaignmonitor.com/blog/archives/2007/04/a_guide_to_css_support_in_emai_2.html">what CSS is and isn&rsquo;t supported</a> in 14 of the most popular email clients.</p>
<p>For a solid level of support in Outlook 2007 and Gmail, as well as other major clients, stick with inline CSS<br />
for the following properties:</p>
<ul>
<li>background-color</li>
<li>border</li>
<li>color</li>
<li>font-family</li>
<li>font-size</li>
<li>font-style</li>
<li>font-variant</li>
<li>font-weight</li>
<li>letter-spacing</li>
<li>line-height</li>
<li>margin</li>
<li>padding</li>
<li>text-align</li>
<li>text-decoration</li>
<li>text-transform</li>
</ul>
<h3>Using tables for <em>basic</em> layout</h3>
<p>If you&rsquo;re looking to add columns or any kind of significant design element to your email, then unfortunately structural tables are the only way to go. Float and width are just too poorly supported at this stage to consider completely CSS-based layouts. Don&rsquo;t get too ahead of yourself though, just because you can use tables doesn&rsquo;t mean pixel perfect design will be easy.</p>
<p>Just like CSS, different email clients handle tables differently. When you start to add in a bit of cell padding and maybe nest a table or two, things can get ugly fast. Again, there are some basic table guidelines you can stick to so you can at least maintain your sanity.</p>
<ol>
<li>Don&rsquo;t go nesting crazy. As soon as you start nesting more than one table deep some email clients really start to choke, especially older clients like Lotus Notes. Even Outlook handles the padding in a nested table differently to that of the parent table.</li>
<li>Instead of specifying your table width in the &lt;table&gt; tag, specify the width of each cell in the &lt;td&gt; tag. You&rsquo;ll find this gives you more consistency across the board.</li>
<li>Make sure you don&rsquo;t mix cellpadding with padding via inline CSS. Some email clients really struggle with this, so stick to basic cellpadding and no CSS for the best results.</li>
</ol>
<p>Here&rsquo;s an example of some simple table code that will render most consistently across the major email clients. Notice the lack of width in the table tag and no CSS.</p>
<pre><code>&lt;table cellspacing=&quot;0&quot;
cellpadding=&quot;10&quot; border=&quot;0&quot;&gt;
 &lt;tr&gt;
  &lt;td width=&quot;120&quot;&gt;&lt;/td&gt;
  &lt;td width=&quot;480&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/table&gt;</code></pre>
<p>The takeaway from this really is to keep things simple, which I think is a good thing for email anyway. Avoid large images and complex layouts and instead focus on making your content readable no matter how your subscribers are viewing your email.</p>
<h3>Looking ahead</h3>
<p>While the current lack of standards support in the email world is discouraging, complaining about it isn&rsquo;t going to get us anywhere. We need to start being vocal to email client developers and encourage them to embrace web standards when rendering HTML emails. It&rsquo;s a big job, and that&rsquo;s why we recently launched the <a href="http://www.email-standards.org/">Email Standards Project</a> &mdash; a brand new initiative that will hopefully broaden the communication lines between designers and those responsible for how email clients render HTML email. Check it out and help spread the word if you think it&rsquo;s an important issue.</p>
<h3>Getting your emails delivered</h3>
<p>Even though achieving consistency in how your emails are rendered is a challenge in itself, you&rsquo;ve still got a long way to go before it actually arrives in your subscriber&rsquo;s inbox.  The world of email deliverability has changed a lot in recent years. Originally, content was king. As long as you weren&rsquo;t blacklisted and your email content didn&rsquo;t include lots of &ldquo;spammy&rdquo; words, then you had a good chance of getting delivered. Today however, ISP&rsquo;s and spam filtering technology has got a whole lot smarter and more aggressive.</p>
<p><em>Who</em> is sending the email is becoming more important than <em>what </em>the email says. ISPs are doing this by watching their customers reassign habits and use of the &ldquo;Mark as spam&rdquo; button, and then tying that back to the sending domain and IP address. If a subscriber is regularly opening your email then you should be in the clear, but if a decent number rarely open your email and mark it as spam then you might not make the inbox much longer. Known as your <strong>sender reputation</strong>, it&rsquo;s <a href="http://www.dmnews.com/cms/dm-news/e-mail-marketing/41532.html">the most important factor in getting your emails delivered today</a>.  Just like the real world, having a good reputation ensures trust, and if ISP&rsquo;s don&rsquo;t trust you, you&rsquo;re in trouble.</p>
<p>This introduces a new challenge to anyone sending reasonable amounts of email. No longer is getting permission enough to assume your email will be delivered. If it&rsquo;s not relevant and exactly what the subscriber asked for, you run the risk of them marking your email as spam. It&rsquo;s a delicate but extremely democratic<br />
system; your ability to deliver email truly is in your subscriber&rsquo;s hands, so treat them with the respect they deserve.</p>
<h3>Ensuring a good sender reputation</h3>
<p>There are three major metrics most ISPs use when calculating your sender reputation, each of which are easy to maintain provided you use some common sense. These metrics are your spam complaint rate, the percentage of email you send to addresses that no longer exist, and finally the number of spam trap addresses you send to. Spam traps are generally email addresses created by ISPs and anti-spam companies to lure spam by never actually signing up to anything, but publishing them in spots where email harvesters will pick them up.</p>
<p>By following the simple guidelines below, you can ensure these three metrics never become an issue and<br />
tarnish your sender reputation.</p>
<ol>
<li><strong>Get their permission</strong> &mdash; File this one under &ldquo;so obvious it&rsquo;s almost not worth mentioning&rdquo;. Unless you have clear, explicit permission from everyone on your list then please don&rsquo;t bother sending anything to them. There are no shades of grey here either &mdash; it&rsquo;s like someone &ldquo;sort of&rdquo; being pregnant. If they don&rsquo;t remember giving you their permission, they&rsquo;ll mark your email as spam and shoot your sending reputation in the foot. This is also the only way to guarantee you won&rsquo;t ever be sending to spam trap addresses.</li>
<li><strong>Set expectations and stick to them </strong>â€“ At the time of obtaining permission, whether it&rsquo;s through a subscribe form on your site or someone giving you their details offline, be sure to tell them when they&rsquo;ll be hearing from you and what they should expect to receive. If someone subscribes to your quarterly newsletter and you start sending to them weekly, you can expect spam complaints.</li>
<li><strong>Be relevant and interesting</strong> &mdash; This one can be hard to get your head around because it <em>seems</em> so easy. Of course my emails are relevant and interesting! But are they really? Before you hit the send button, try and put yourself in your subscriber&rsquo;s shoes and honestly ask yourself if it&rsquo;s something you&rsquo;d be interested in hearing about. It&rsquo;s getting <a href="http://www.campaignmonitor.com/blog/archives/2007/07/the_mark_as_irrelevant_button.html">more and more common</a> for subscribers to mark your email as spam even if they originally opted-in, purely because it wasn&rsquo;t relevant enough.</li>
<li><strong>Make it easy to leave</strong> &mdash; One particular mistake that I see quite a bit is making it hard for your subscriber&rsquo;s to unsubscribe from your list. The mentality is that by hiding your unsubscribe link in a small font somewhere in the footer then maybe people won&rsquo;t bother. Today, if a subscriber wants out and can&rsquo;t immediately see the unsubscribe link, I guarantee the &ldquo;Mark as Spam&rdquo; button will be their next best choice. If anyone does click your unsubscribe link, don&rsquo;t make them jump through hoops to get off your list either. A single-click is all it should take.</li>
<li><strong>Process all bounces</strong> &mdash; Every time a mail server receives an email for an address that no longer exists or is temporarily unavailable, they&rsquo;ll send you back what&rsquo;s called a &ldquo;bounce&rdquo;. This is a simple email that often explains why the email couldn&rsquo;t be delivered and comes in two distinct flavours. A &ldquo;hard bounce&rdquo;, which is a permanent error meaning that address is no longer in use, and a &ldquo;soft bounce&rdquo;, which is a temporary issue such as a full mailbox. The moment you get a hard bounce back, you should immediately remove that address from your list. While they are often temporary, I recommend keeping track of all soft bounces. As soon as an email address soft bounces 3 times, consider it permanent and remove them from your list. Your sender reputation will thank you for it.</li>
</ol>
<h3>Keeping track of spam complaints with ISP feedback loops</h3>
<p>Because keeping your spam complaint rate low is so important, a number of the major ISPs have feedback loops set up where they&rsquo;ll send you an email letting you know whenever anyone marks your email as spam. This is <em>incredibly</em> useful &mdash; you can immediately remove anyone who complains from your list, and you can also quickly gauge if your content is starting to become irrelevant. Here are some brief instructions on the major feedback loops you should register your sending IPs with if you&rsquo;re taking care of email delivery in-house.</p>
<table>
<tr valign="top">
<td width="47%"><strong>Overview</strong></td>
<td width="52%"><strong>What you&rsquo;ll need to supply</strong></td>
</tr>
<tr valign="top">
<td><a href="http://postmaster.live.com/Services.aspx"><strong>Windows Live Hotmail (Hotmail/MSN)</strong></a><strong> <br />
  </strong>The Hotmail Junk Email Reporting Program is a must to register for and includes all spam complaints from Windows Live Hotmail and Windows Live Mail.</td>
<td>Company and domain information <br />
  Your sending IP addresses <br />
  Your sending practices <br />
  Support for Sender ID email authentication (explained below)</td>
</tr>
<tr valign="top">
<td><a href="http://postmaster.live.com/Services.aspx"><strong>Microsoft&rsquo;s Smart Network Data Services</strong></a><strong> <br />
  </strong>A great way to monitor your deliverability to all Hotmail and MSN accounts. You register your IP&rsquo;s and they tell you if there are ever any delivery issues.</td>
<td>Company and domain information <br />
  Support for Sender ID email authentication (explained below)</td>
</tr>
<tr valign="top">
<td><a href="http://postmaster.aol.com/fbl/fblinfo.html"><strong>AOL</strong></a> <br />
  Includes all spam complaints from desktop and web-based AOL accounts.</td>
<td>Company and domain information <br />
  Your sending IP addresses</td>
</tr>
<tr valign="top">
<td><strong>Yahoo! Mail <br />
  </strong>Yahoo! doesn&rsquo;t currently have a page dedicated to their feedback loop, but you can apply to be registered by <a href="mailto:mail-abuse-bulk@cc.yahoo-inc.com">emailing them</a>. </td>
<td>Company and domain information <br />
  The Domainkeys signing key you use for each domain (explained below) <br />
  A signed agreement sent back to Yahoo!</td>
</tr>
<tr valign="top">
<td><a href="http://www.spamcop.net/anonsignup.shtml"><strong>SpamCop.net</strong></a></strong><br />
Once you create an account and log in, you can add the IP range to be monitored <a href="http://www.spamcop.net/mcgi?action=reqroute">here</a>.</td>
<td>Company and domain information <br />
  Your sending IP addresses
  </td>
</tr>
</table>
<p>Most ISPs use the standard <a href="http://mipassoc.org/arf/">Abuse Feedback Reporting format</a> when sending you these complaints, which often involves stripping any personal information about who made the original spam complaint. Because of this you&rsquo;ll need to make sure you include some kind of identifier (like a subscriber ID) in the original email so you can confirm who made the complaint and remove them from your list.</p>
<h3>Embracing email authentication</h3>
<p>Email authentication is a set of important technologies that add a much needed accountability layer into the emails you send and can instantly improve your deliverability to many of the major ISPs. By setting up authentication for all of your sending domains, you can prove an email is coming from you and isn&rsquo;t fraudulent. These days it&rsquo;s becoming a must-have for anyone sending a decent amount of email.</p>
<p>Authentication works by adding some simple records in the DNS for each sending domain you use. For example, if you send email from <a href="mailto:news@abcwidgets.com">news@abcwidgets.com</a>, you&rsquo;ll need to add your authentication records into the DNS for <a href="http://abcwidgets.com">abcwidgets.com</a>. Right now there are two main authentication systems that you should be using:
</p>
<table>
<tr valign="top">
<td width="72%"><strong>Authentication method</strong></td>
<td width="27%"><strong>ISP&rsquo;s that support it</strong></td>
</tr>
<tr valign="top">
<td><a href="http://www.microsoft.com/mscorp/safety/technologies/senderid/default.mspx"><strong>Sender ID</strong></a><strong> <br />
  </strong>A Microsoft technology based on the SPF standard that involves adding a record to your DNS indicating which mail servers are allowed to deliver mail on your behalf. You can create your Sender ID record in a few minutes using <a href="http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/">this wizard</a>.</td>
<td>MSN/Hotmail <br />
  AOL <br />
  Juno <br />
  NetZero <br />
  United <br />
  Gmail</td>
</tr>
<tr valign="top">
<td><a href="http://domainkeys.sourceforge.net/"><strong>DomainKeys</strong></a><strong> and </strong><a href="http://dkim.org/"><strong>DKIM</strong></a><br />
DomainKeys is a Yahoo innovation that involves adding a record to your DNS containing a public key, and then adding a corresponding digital signature to your mail headers that matches the corresponding private key to the one In your DNS. DKIM is a newer standard combining DomainKeys and another standard. If possible, I recommend supporting both.</td>
<td>Yahoo <br />
  Gmail <br />
  Earthlink</td>
</tr>
</table>
<h3>Keeping your own house in order</h3>
<p>So, now that you&rsquo;ve got a good sending reputation and are ensuring it remains under control by monitoring spam complaints, what else is left? Here&rsquo;s a checklist of some of the more important finer points that you&rsquo;ll also want to ensure is covered in your email infrastructure:</p>
<ol>
<li><strong>Reverse DNS</strong> &mdash; It&rsquo;s crucial to ensure you have RDNS set up for every IP you deliver email from. RDNS involves a receiving mail server looking at the IP address your email is coming from and then checking to see if there is a registered domain associated with it. It&rsquo;s a requirement for most receiving mail servers and whitelists, so don&rsquo;t overlook it.</li>
<li><strong>Valid mail headers</strong> &mdash; The information contained in your mail headers is crucial to a receiving mail server deciding if they will accept your email. Make sure you&rsquo;ve got a valid return-path (where bounces are sent), the correct MIME-Version and encoding information, DomainKeys/DKIM signature and your IPs in the received lines have RDNS set up. I&rsquo;d also recommend checking out the <a href="http://www.list-unsubscribe.com/">list-unsubscribe</a> header currently supported by Windows Live Hotmail.</li>
<li><strong>Throttling your delivery speeds</strong> &mdash; different ISPs have different maximum speeds you can send at. Once you start to exceed these speeds, they&rsquo;ll consider you a spammer and start blocking you. Make sure you set a reasonable speed limit on the number of connections and messages you send per hour so you don&rsquo;t tread on any ISPs toes. From experience most ISPs will allow a few hundred simultaneous connections and 25 or so messages per connection.</li>
<li><strong>Stay off blacklists</strong> &mdash; While your sending reputation continues to become more important, you still need to make sure you don&rsquo;t appear on any major blacklists. Even if you&rsquo;re following all the guidelines I&rsquo;ve mentioned above, a rare blacklisting can happen to the best of us. I recommend checking the free <a href="http://www.dnsstuff.com/">Spam Database Lookup</a> provided by DNS Stuff as often as you can. You can also apply to be whitelisted by ISPs such as <a href="http://postmaster.aol.com/whitelist/">AOL</a> and <a href="http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulk.html">Yahoo</a>.</li>
<li><strong>Monitor all abuse accounts</strong> &mdash; By default some anti-spam systems (and people) will send any spam complaints to <a href="mailto:abuse@yourdomain.com">abuse@yourdomain.com</a>. Make sure it&rsquo;s set up and is actually going to someone responsible for your sending reputation. If a complaint is made, resolve it immediately. Don&rsquo;t forget to register your abuse accounts with <a href="http://www.abuse.net/">abuse.net</a>.</li>
</ol>
<p>As you&rsquo;ve probably gathered, nothing about email marketing is a piece of cake. Whether it&rsquo;s getting your email delivered or making sure it looks great once it arrives. If you&rsquo;re using an Email Service Provider like my company <a href="http://www.campaignmonitor.com/">Campaign Monitor</a> to deliver your emails, all of the technical challenges I mentioned above will be covered for you automatically. Nevertheless, the technical side is only a small part of your email reputation &mdash; the crucial ingredients of permission and relevance are up to you. If you are responsible for delivering email from your own servers however, I hope that by sharing many of the lessons I learned the hard way over the last few years you can get your emails delivered, and keep your sanity in the process.</p>
<p><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1767&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/design/ensuring-your-html-emails-look-great-and-get-delivered/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>The Standards Way to Do Dynamic Data</title>
		<link>http://carsonified.com/blog/design/the-standards-way-to-do-dynamic-data/</link>
		<comments>http://carsonified.com/blog/design/the-standards-way-to-do-dynamic-data/#comments</comments>
		<pubDate>Tue, 08 May 2007 08:39:14 +0000</pubDate>
		<dc:creator>Sean Madden</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/features/design/the-standards-way-to-do-dynamic-data</guid>
		<description><![CDATA[By <strong>Sean Madden</strong><br />Somewhere in between presenting static information graphics and complex, interactive data dashboards there&#8217;s a need for a way to visualize moderately dynamic data on the web.  Oftentimes the solutions you see implemented are clunky, for example, manually creating multiple frames of various data points and uploading them by hand. These methods scale poorly and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fthe-standards-way-to-do-dynamic-data%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fthe-standards-way-to-do-dynamic-data%2F" height="61" width="51" /></a></div><p>Somewhere in between presenting static information graphics and complex, interactive data dashboards there&#8217;s a need for a way to visualize moderately dynamic data on the web.  Oftentimes the solutions you see implemented are clunky, for example, manually creating multiple frames of various data points and uploading them by hand. These methods scale poorly and try even the most patient.</p>
<p>Traditionally the task of combatting the challenge has fallen to Flash. To be sure, it is a fine choice. I am not here to rail against Flash and contend that absolutely  all things on the web should be done with HTML, CSS, and JavaScript. Flash is tailor-made for creating dynamic web experiences. However, using Flash in some cases might be the technological equivalent of hitting a fly with a sledgehammer.</p>
<p>By using a standardized set of web technologies, it is possible to produce interesting data visualizations that degrade gracefully in the face of browser inferiority.  Through careful semantic crafting of our XHTML containers, clever use of CSS, and a splash JavaScript, we can build data visualizations that enhance our message and communicate better to our users.  As a frame for this technique, I have created a fake site for a university fundraising event. The data visualization we&#8217;re going to be working with here is a temperature gauge that will display progress towards a monetary goal. Go ahead and take a <a href="http://www.thinkvitamin.com/misc/data-visuals/faike_js.htm">sneak peek at the final result</a>. </p>
<h3>Building the XHTML</h3>
<p>As with most techniques, the foundational XHTML is the most important piece, enabling us to progressively enhance the visual presentation. The structure of our XHTML will be in three parts:</p>
<ol>
<li>The container of the data visualization</li>
<li>The progress indicator to be animated</li>
<li>A textual representation of the data</li>
</ol>
<p>The structure for this is alarmingly simple, so I wonâ€™t drag it out over multiple steps for you.</p>
<pre>
<code>
<div class="gauge">
<div class="current-value" id="campaign-progress-current">

50%
</div>
</div>

</code>
</pre>
<p>It may seem as though we have an extra <code>div</code> element here. In many other CSS articles, authors go to great lengths to reduce the number of <code>div</code> elements needed to construct a page, oftentimes relying on readily-available block-level elements. While this methodology has great merit, I will always use an extra <code>div</code> instead of using a <code>p</code> when it comes to the visual composition of a key page element. More often than not my work is handed off to a different design/content team and I have no idea if they are going to realize the <code>p</code> tag has a purpose beyond simple content formatting. Using an extra <code>div</code> here protects the integrity of the visual structure moving forward. </p>
<h3>Jiggering the CSS</h3>
<p> The visualization component will be handled through a clever combination of background images and property manipulation.  When I first started developing this technique my instinct was to use absolute positioning to slide the inner element in and out as necessary, essentially â€œfillingâ€ the container with the inner element and hiding the unnecessary parts. </p>
<p>This method worked fine when I was only working with simple blocks. As soon as I started working with non-square shapes it fell completely flat. The points between 0 and 100 never lined up correctly.  Searching for a new solution, I struck on the idea to align the inner element with the edge of its parent and alter its width/height depending upon the value being displayed.  By doing so we gradually reveal the background image of the inner element, allowing it to line up perfectly with the background element of its parent. </p>
<p>What we will do is create two images. The first image will represent the empty state of our visualization and the second will be the completely full state. The empty state will be applied as the background of the gauge element and the full state as the background of the progress indicator element. Technically speaking, Iâ€™m only going to create one image with both states in it. For more information on why Iâ€™ve chosen to do this, you can refer to <a href="http://alistapart.com/articles/sprites">CSS Sprites: Image Slicing&#8217;s Kiss of Death</a>, an excellent article by <a href="http://www.mezzoblue.com">David Shea</a>.  You can <a href="http://www.thinkvitamin.com/misc/data-visuals/gauge.gif">view the image here.</a></p>
<p>The CSS for the container is as follows:</p>
<pre>
<code>
.gauge{
	width: 77px;
	height: 442px;
	position:relative;
	background: #333 url(gauge.gif) top left no-repeat;
}
</code>
</pre>
<p>The CSS here is pretty trivial, but do notice that we specify a hex color value in the background property. This hex color increases the technique&#8217;s accessibility and will provide a solid reference color to those who have disabled images. </p>
<p>For the inner element:</p>
<pre>
<code>
.gauge .current-value {
	position:absolute;
	left: 0px;
	bottom: 0px;
	height: 50%;
	text-align:center;
	width: 100%;
	background: red url(gauge.gif) bottom right no-repeat;
}
</code>
</pre>
<p>Because this animation is vertical I have positioned the inner element at the bottom of the container and positioned the background element at the bottom of the inner element. This technique works just fine as a horizontal animation as well, with the primary difference being where the internal element is anchored to its parent. As before, we specify a color in the event that images are disabled in the userâ€™s browser. </p>
<p>From here, the only property we care about is height. In our example it is set to 50%. The entire visualization hinges on this value being accurate. You may be tempted to scrape the value from the XHTML <code>p</code> element with JavaScript and set the height from there, but that alienates your users with JavaScript disabled.  Therefore, your options are to set this dynamically with a backend script or update it by hand.  Either way is exponentially favorable to creating 100 distinct images for the intermittent states. </p>
<p>The last step is to hide the textual value.</p>
<pre>
<code>
.gauge .current-value * {
	display:none;
}
</code>
</pre>
<p><i>Note: I am not here to get into a debate on the best way to hide text.</i></p>
<p>This step is optional, you may wish to leave the textual equivalent of your data displayed over the top of the visualization.  I have chosen to hide it, but users who come along with CSS disabled will still be able to view the progress of the fundraiser.</p>
<p>At this point, you can stop. You have created a compelling visual representation that is highly reusable and degrades gracefully in the face of antiquated technology, all using skills already at your disposal.  Take <a href="http://www.thinkvitamin.com/misc/data-visuals/faike.htm">a look at the example page</a> to see the results.  However, if you want to add a finishing touch you can sprinkle in some JavaScript animation.</p>
<h3>Working The JavaScript</h3>
<p>Now that we have our gauge built, we will add an unobtrusive layer of JavaScript to animate the mercury of our gauge from zero to its current state.  Those users who do not have JavaScript enabled will not see this, but those who do will be presented with a  nice animation to complete the temperature gauge visualization.The first thing we will do is setup an object literal to contain our gauge animation.  This will help us maintain scope and increase portability if we need to extend our JavaScript.</p>
<pre><code>var gauge = {}</code></pre>
<p>We are going to need to keep track of two things: the document node weâ€™re animating and the height at which we will need to stop animating.  We donâ€™t know either of these things at the time of creation, so weâ€™ll create variable place holders for now.</p>
<pre>
<code>
var gauge = {
	targetHeight : 0,
	progressMeter : new Object(),
}
</code>
</pre>
<p>My own preference when working with JavaScript object literals is to create an <code>init()</code> method to kick start whatever it is I will be using them for. In this case, <code>init()</code> will need to do three things:</p>
<ol>
<li>	Verify the userâ€™s browser supports the Document Object Model (DOM) specific methods we will be using</li>
<li>	Reset the value of the gauge to 0</li>
<li>	Animate the gauge to its final value</li>
</ol>
<p>As such, our <code>init()</code> method will look like:</p>
<pre>
<code>
init : function(){
		if(!document.getElementByID) return false;
		this.resetValue();
		this.animateGauge();
}
</code>
</pre>
<p>The first line checks to see if we can use <code>document.getElementById</code> and aborts if we cannot. This will exclude all browsers that do not support the standard DOM.   The next two lines are for methods we have not written yet, which is something we will do now. </p>
<pre>
<code>
resetValue : function(){
		this.progressMeter = document.getElementById("campaign-progress-current");
		this.targetHeight = this.progressMeter.offsetHeight;
		this.progressMeter.style.height = "0px";
	}
</code>
</pre>
<p>This method grabs the node we wish to animate and stores it in the <code>progressMeter</code> variable we set above.  It then grabs the current height of the node and saves it as the target height we will be animating to.  Finally, it sets the height of the node to 0.  Once we have done all of this, we are ready to animate the mercury to its current value.</p>
<pre>
<code>
animateGauge : function(){
		var currHeight = this.progressMeter.offsetHeight;
		if(currHeight == this.targetHeight){}
		else{
			var interval = Math.ceil((this.targetHeight - currHeight) / 10);
			this.progressMeter.style.height = currHeight   interval   "px";
			setTimeout("gauge.animateGauge()",30);
		}
	}
</code>
</pre>
<p>This function is where the magic happens. It first grabs the current height of the node and compares it to the target height and halts the animation if they are equal. If they are not equal, it runs a very simple formula to calculate an animation interval which is appended to the nodeâ€™s current height. The formula we use creates a very simple illusion of easing, which is more natural to the eye than a simple linear animation.  Once itâ€™s done that, it waits 30 milliseconds and calls the <code>animateGuage()</code>  again. This process, known as recursion, will repeat until the gauge has reached its target value. Now all we need to do is call the <code>init()</code> function once the window has loaded.</p>
<pre>
<code>
window.onload = function(){
		gauge.init();
	}
</code>
</pre>
<p><i>Note: I fully acknowledge that this is a very primitive onload function and should not be used in production. However, that debate is long and not appropriate to this article. Because I have used this technique you may notice some initial flickering.</i></p>
<p>Putting it all together, the final code looks like this:</p>
<pre>
<code>
window.onload = function(){
		gauge.init();
	}

var gauge = {

	targetHeight : 0,
	progressMeter : new Object(),

	init : function(){
		if(!document.getElementById) return false;
		this.resetValue();
		this.animateGauge();
	},

	resetValue : function(){
		this.progressMeter = document.getElementById("campaign-progress-current");
		this.targetHeight = this.progressMeter.offsetHeight;
		this.progressMeter.style.height = "0px";
	},

	animateGauge : function(){
		var currHeight = this.progressMeter.offsetHeight;

		if(currHeight == this.targetHeight){
		}

		else{
			var interval = Math.ceil((this.targetHeight - currHeight) / 10);
			this.progressMeter.style.height = currHeight   interval   "px";
			setTimeout("gauge.animateGauge()",30);
		}
	}
}
</code>
</pre>
<p>Thatâ€™s it.  Take a look at the <a href="http://www.thinkvitamin.com/misc/data-visuals/faike_js.htm">final example </a>to see this at work. This particular data visualization example is very simple, but it is easily extendable and limited only by your ability to create graphical representations of data. With slightly more complicated JavaScript, you can create very dynamic animations on top of this basic XHTML/CSS. As I stated in the introduction, this technique should probably not be used for large data visualization dashboards or situations requiring extensive animation. However, it is excellent at providing progressive enhancement for situations calling for low-to-moderate levels of data visualization.  </p>
<p class="diggit"><img src="http://www.digg.com/img/digg-guy-small.gif" alt="digg.com logo" /> Like this article? <a href="http://digg.com/programming/The_Standards_Way_to_Do_Dynamic_Data">Digg it</a>!</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=140&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/design/the-standards-way-to-do-dynamic-data/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Book Review &#039;Beginning CSS Web Development&#039;, by Simon Collison</title>
		<link>http://carsonified.com/blog/carsonified/reviews/beginning-css-web-development-by-simon-collison/</link>
		<comments>http://carsonified.com/blog/carsonified/reviews/beginning-css-web-development-by-simon-collison/#comments</comments>
		<pubDate>Thu, 15 Feb 2007 16:07:36 +0000</pubDate>
		<dc:creator>Gareth Rushgrove</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.thinkvitamin.com/reviews/uncategorized/beginning-css-web-development-by-simon-collison/</guid>
		<description><![CDATA[By <strong>Gareth Rushgrove</strong><br />Gareth Rushgrove checks out Simon Collison's comprehensive guide to CSS, published by Apress.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style=""><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Freviews%2Fbeginning-css-web-development-by-simon-collison%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fcarsonified%2Freviews%2Fbeginning-css-web-development-by-simon-collison%2F" height="61" width="51" /></a></div><p>The cascade, inheritance, contextual selectors. As someone who has been using Cascading Style Sheets (<acronym title="Cascading Style Sheets">CSS</acronym>) in the real world for a while it&#8217;s sometimes easy to forget it can be tricky to get started. <em>Beginning <acronym title="Cascading Style Sheets">CSS</acronym> Web Development</em>, written by <a href="http://www.colly.com/">Simon Collison</a>, aims to get you on the road to creating <q>usable, compact, good looking, well structured, and easy to maintain</q> websites.</p>
<p>Anyone familiar with Simon from his long running blog, <a href="http://www.colly.com/">collylogic.com</a> (now found at <a href="http://www.colly.com/">colly.com</a>), can expect the same easy reading tone and witty repartee. Colly&#8217;s long-running obsession with music proves useful too; with the obligatory case study and examples feeling more real world than in most web design books. Although on second thoughts a band featuring Keith Moon, Jimi Hendrix and Simon himself may be too good to be true&#8230;</p>
<p>The book progresses through using <acronym title="Cascading Style Sheets">CSS</acronym> to style all the basic HTML elements, concentrating on the sorts of things that real world designers get up to most of the time; there&#8217;s an entire chapter on lists for example. A few excepts stood out as particularly well placed; a good discussion of typography on the web with some practical alternatives to the oft used web safe fonts, details of the most common image formats and when to use them and a particularly clear explanation of the complexity of floats.</p>
<p>Coming from someone like Simon it should go without saying that the book is up to date. Fixed vs liquid vs elastic vs variable fixed width layouts, faux column and large footers, accessibility and even IE7 are all mentioned at some point. Links are provided where relevant to helpful sites which should help minimize the inevitable impact of print going out of date.</p>
<p>As well as practical examples the book provides a useful compendium of the state of the art when it comes to <acronym title="Cascading Style Sheets">CSS</acronym>; coding styles, <a href="http://www.stopdesign.com/">Douglas Bowman&#8217;s</a> flags, commenting, indenting, modular style sheets, ideas for organizing style sheets. This information is available online, but would require wading through scattered blog posts from the last several years or reading the <a href="http://www.css-discuss.org/">css-discuss</a> archives from end to end. In short if you&#8217;re just starting out then <em>Beginning <acronym title="Cascading Style Sheets">CSS</acronym> Web Development</em> will save you time.</p>
<p>The only problem I have with <em>Beginning <acronym title="Cascading Style Sheets">CSS</acronym> Web Development</em> stems from the title, specifically the <acronym title="Cascading Style Sheets">CSS</acronym> part. Web design and development is a multi-tiered discipline, and <acronym title="Cascading Style Sheets">CSS</acronym> often stands or falls on the strength of the underlying markup. The book assumes the reader has a good understanding of modern, semantic, markup practices and as such is not ideally suited for everyone. It also doesn&#8217;t provide that much material for the experienced designer or developer that they probably haven&#8217;t seen before.</p>
<p>In short the book is a sign of a maturing industry. It is ideally suited for use in teaching, either students or other professional developers, the joys of <acronym title="Cascading Style Sheets">CSS</acronym>. It probably won&#8217;t be your first web design book, and neither should it be your last but it will provide a constant companion and reference for those starting on the road to becoming the next web design rock star.</p>
<p>Book Name: Beginning Web Development<br />
Publisher: Apress<br />
Author: Simon Collison<br />
URL: <a href="http://csswebdevelopment.com/">http://csswebdevelopment.com/</a><br />
Price: $34.99 <a href="http://www.amazon.com/gp/product/1590596897?ie=UTF8&#038;tag=vitamin06-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1590596897">Save 30% on <em>Beginning CSS Web Development</em> at Amazon</a><img src="http://www.assoc-amazon.com/e/ir?t=vitamin06-20&#038;l=as2&#038;o=1&#038;a=1590596897" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
Rating out of 5: 4</p>
<img src="http://carsonified.com/?ak_action=api_record_view&id=1736&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://carsonified.com/blog/carsonified/reviews/beginning-css-web-development-by-simon-collison/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
