CSS: The How and The Why: Roadmap Series
CSS: The How and The Why: Roadmap Series
Issue 1
2009 is a big 10 anniversary year. It's been 10 years since Macromedia launched Dreamweaver. WebAssist is entering
th
its 10 year of creating world-class level products. And, the push for web standards has been on-going for 10 years. As
such, I thought it'd be good to take a step back and remind folks why web standards in generaland CSS in particularis
a good idea, both from a business and artistic point of view. In the spirit of providing a useful roadmap for web designers,
this article will be a mix of a broader 10,000 foot view as to why you should create CSS-based sites, and a more practical,
step-by-step set of instructions as to how.
CSS-based layouts and proper use of CSS are at the root of web standards. While there are many in the community
including myself and WebAssistconstantly beating the drum for wide-spread CSS use and overall compliance to web
standards, you need to understand the benefits so you can decide to follow this design path yourself. Sooner or later,
you'll need to convince your boss, colleagues or client why a CSS-based approach is the right way to go for a new or
redesigned site. Although it involves technology, it's not really a technological decisionit's a practical, business decision.
There are a great many advantages to the web standards design, but let's look at the top three: portability, speed and
maintenance.
Better portability
One of the primary tenets of web standards is the separation of content from presentation. A key benefit of this separation
is the ability to reshape the content to fit the media. You can, for example, take a site that looks great on the computer
screen and reconfigure it for hard copy printer output with a CSS style sheet. With the change of just a few style rules, you
can hide areas not pertinent to the page, like a footer of links, or expand a column of text to better fit the printer margins.
One of our extensions, Eric Meyer's CSS Sculptor, automatically creates separate style sheets for both screen and print.
Most importantly, the portability doesn't stop there. As handheld device technology proliferates, through the iPhone and
other devices, cell phone browsing is much more of a reality today. Through a separate CSS style sheet, your sites can
look their best no matter the media.
Page 2 of 4
<div id="footer">Footer</div>
Not only is the code much more readable, and thus easier to update (a subject for another, upcoming paper), but the
markup is substantially less. Compare character count of the two methods and you'll find that the CSS-based approach is
46% smaller. Naturally, the download times for these particular code snippets would be essentially the same, but if you
look at completely developed pages, a notable difference is evident. With major sitesor any site experiencing high
trafficthere are actual, significant savings for bandwidth costs. Moreover, designers typically find that the faster
download times result in an increased number and length of page visits, which again, can result in a notable increase in
revenue, especially if you consider banner and search engine ad placement.
Easier maintenance
As noted above, the code for a CSS-based site is much easier to read and, therefore, update. Faster changes mean less
time which translates into more time designers can spend on other projects, another real, bottom-line benefit. When
external style sheets are used, site-wide changes can occur almost instantaneously and even, if appropriate, be userdriven. For a wildly entertaining look at just how different the same content can be, look no further than
www.csszengarden.com. Here are two examples of the same content with totally different appearances, all thanks to
CSS.
Roadmap Series
Issue 1
First steps
Okay, let's say you're totally sold and you're ready to move to CSS-based layouts. What do you do first? Here are three
basic steps to help you on your way.
Page 3 of 4
<div> element goes on top of the content one. When it comes time to ramp up the complexity and split the content section
into a sidebar and main area, those two "blocks" are side-by-side, in-between the header and footer. In the early stages of
climbing the CSS learning curve, you could do worse than playing with your blocks :-).
About WebAssist
WebAssist helps you build better websites faster by offering software, solutions, and training needed to succeed on the
web. WebAssist.com hosts a thriving community of over 300,000 designers, developers, and business owners.
WebAssist's partners include Adobe, Microsoft, and PayPal.
WebAssist.com Corporation
8899 University Center Dr.
San Diego, CA 92122
USA
www.webassist.com
Page 4 of 4