<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Web Design Blog, Toronto</title>
	<link>http://www.impressivewebs.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Wed, 27 Aug 2008 04:11:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Impressive Links of the Week (August 27/08)</title>
		<link>http://www.impressivewebs.com/impressive-links-of-the-week-august-2708/</link>
		<comments>http://www.impressivewebs.com/impressive-links-of-the-week-august-2708/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 04:09:47 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[Impressive Links of the Week]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/impressive-links-of-the-week-august-2708/</guid>
		<description><![CDATA[
Search Engine Optimization Tips For PDFs
Excessive texting &#8216;damages your health&#8217;
Mozilla shows off Aurora browser concept
The Internet As You Know It Is Slated For Death By 2012
7 Principles Of Clean And Optimized CSS Code
]]></description>
			<content:encoded><![CDATA[<p>
<a rel="external" href="http://www.searchengineoptimizationjournal.com/2008/07/26/search-engine-optimization-tips-for-pdfs/">Search Engine Optimization Tips For PDFs</a></p>
<p><a rel="external" href="http://www.reghardware.co.uk/2008/07/29/sms_health_problems/print.html">Excessive texting &#8216;damages your health&#8217;</a></p>
<p><a rel="external" href="http://www.techworld.com/news/index.cfm?RSS&amp;NewsID=102309">Mozilla shows off Aurora browser concept</a></p>
<p><a rel="external" href="http://www.naturalnews.com/023858.html">The Internet As You Know It Is Slated For Death By 2012</a></p>
<p><a rel="external" href="http://www.smashingmagazine.com/2008/08/18/7-principles-of-clean-and-optimized-css-code/">7 Principles Of Clean And Optimized CSS Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/impressive-links-of-the-week-august-2708/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Ways to Turn Off Website Visitors</title>
		<link>http://www.impressivewebs.com/5-ways-to-turn-off-website-visitors/</link>
		<comments>http://www.impressivewebs.com/5-ways-to-turn-off-website-visitors/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 05:42:36 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[Internet Marketing]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/5-ways-to-turn-off-website-visitors/</guid>
		<description><![CDATA[After reading 5 Ways To Turn Off Customers (for Brick and Mortars) on smallbusinessnewz.com, I thought I would write my own version of this article using the same sub-headings applied to websites. The advice given in the original article is solid and can easily be adapted to online businesses.
1. Bad Location
While a &#8220;bricks and mortar&#8221; outfit will [...]]]></description>
			<content:encoded><![CDATA[<p>After reading <a rel="external" href="http://www.smallbusinessnewz.com/topnews/2008/08/05/5-ways-to-turn-off-customers-for-brick-and-mortars">5 Ways To Turn Off Customers (for Brick and Mortars)</a> on smallbusinessnewz.com, I thought I would write my own version of this article using the same sub-headings applied to websites. The advice given in the original article is solid and can easily be adapted to online businesses.</p>
<p><strong>1. Bad Location<br />
</strong>While a &#8220;bricks and mortar&#8221; outfit will have trouble in certain areas depending on competition and other factors, the same problem can occur if a website is not properly &#8220;located&#8221; when it comes to search engine findability, domain name, and hosting.</p>
<p>It&#8217;s sad to see that many businesses today still need to be reminded that free hosting packages, bad keyword density and poor choice in domain name can all have an effect on whether or not people stumble in during their online shopping. So website owners should invest the time, effort and money necessary to ensure their &#8220;location&#8221; on the web is suitable to staying competitive in their market.</p>
<p><strong>2. High Prices<br />
</strong>Due to the nature of the web, and an increase in online competition, it is harder for companies to markup prices exorbitantly. But sometimes overhead costs force prices to stay relatively high. Website owners should try to battle this by offering online promotions, coupons, returning-customer deals and other sales techniques that will make the high prices not seem so high in the long run.</p>
<p><strong>3. Dirty Store<br />
</strong>Yes, a website needs to be clean just as a brick and mortar store does. Make the investment to ensure your website&#8217;s code is standards-compliant, cross-browser friendly, and accessible to users with disabilities. Also, ensure your online business has easy-to-use site navigation by means of site maps, site search, and breadcrumb-friendly page structure.</p>
<p><strong>4. Pushy Salespeople<br />
</strong>Your web page&#8217;s content can be just as intimidating as a pushy in-person sales person. So hire a good copywriter and keep your pages friendly and informative. Don&#8217;t make the users feel that they are stupid if they don&#8217;t buy your product, and certainly don&#8217;t insult their intelligence. You can still tell them how important your product or service is by being tactful and insightful, and by displaying a good knowledge of the industry.</p>
<p><strong>5. Poor Customer Service<br />
</strong>Your website&#8217;s forms and shopping cart functionality should not alienate the user from your company. Site visitors should always feel that you or your representatives are available to help them at all times in case there is any problem, or if they have any questions. So make sure you provide a good FAQ page, a help section, a toll free number to call, and an easy to use contact form &#8212; and follow this up with a fast turn-around on all customer service and sales inquiries.</p>
<p><strong>Bricks and Mortar or Online &#8212; the principles are the same<br />
</strong>So, if you have a standard &#8220;bricks and mortar&#8221; business complemented with an online store or brochure website, follow the advice found in the original article for your bricks and mortar, and apply some of these tips mentioned above for your online business and you&#8217;ll be sure to reap the benefits.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/5-ways-to-turn-off-website-visitors/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Impressive Links of the Week (August 11/08)</title>
		<link>http://www.impressivewebs.com/impressive-links-of-the-week-august-1108/</link>
		<comments>http://www.impressivewebs.com/impressive-links-of-the-week-august-1108/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 01:23:16 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[Impressive Links of the Week]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/impressive-links-of-the-week-august-1108/</guid>
		<description><![CDATA[Free PDF download: Firefox 3 Revealed
Search Engine Optimization Tips For PDFs
10 Tips For Being A Greener Web Designer
Microsoft tries to one-up Google PageRank
Firebug introduces &#8216;Firebug Lite&#8217;
]]></description>
			<content:encoded><![CDATA[<p><a rel="external" href="http://www.sitepoint.com/books/firefox3/">Free PDF download: Firefox 3 Revealed</a></p>
<p><a rel="external" href="http://www.searchengineoptimizationjournal.com/2008/07/26/search-engine-optimization-tips-for-pdfs/">Search Engine Optimization Tips For PDFs</a></p>
<p><a rel="external" href="http://www.sitepoint.com/newsletter/viewissue.php?id=5&amp;issue=47#7">10 Tips For Being A Greener Web Designer</a></p>
<p><a rel="external" href="http://news.cnet.com/8301-1023_3-9999038-93.html">Microsoft tries to one-up Google PageRank</a></p>
<p><a rel="external" href="http://getfirebug.com/lite.html">Firebug introduces &#8216;Firebug Lite&#8217;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/impressive-links-of-the-week-august-1108/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Easy Equal Columns with CSS</title>
		<link>http://www.impressivewebs.com/easy-equal-columns-with-css/</link>
		<comments>http://www.impressivewebs.com/easy-equal-columns-with-css/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 06:46:37 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/easy-equal-columns-with-css/</guid>
		<description><![CDATA[In a previous article I described (in principle) a method using JavaScript to get equal columns in a two-column layout. Of course, that&#8217;s not always the most elegant solution. Another solution, which is much easier to implement is completely CSS based. I&#8217;ll describe briefly how this is done and what possible effects it could have [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous article I described (in principle) a method <a href="/equal-column-height-using-javascript/">using JavaScript to get equal columns</a> in a two-column layout. Of course, that&#8217;s not always the most elegant solution. Another solution, which is much easier to implement is completely CSS based. I&#8217;ll describe briefly how this is done and what possible effects it could have on your site&#8217;s layout and code. <a href="/equal-columns.html" title="Easy Equal Columns with CSS demo">Here is the demo page</a>, if you want to jump ahead.</p>
<p><strong>The Key &#8212; The columns are not *really* equal<br />
</strong>The only way to do this without using a very complex CSS layout is to essentially create the illusion that you have equal columns. But don&#8217;t worry &#8212; although the result is not really equal columns, it looks and acts exactly as an equal column layout would.</p>
<p><strong>How to mimic the columns<br />
</strong>To describe the method, I&#8217;ll just use a simple example: Two DIVs side by side representing the two columns; and one DIV containing the two. From there, it&#8217;s quite simple &#8212; just wrap your containing DIV with another DIV then apply &#8221;overflow: hidden&#8221; on that outer DIV to ensure it doesn&#8217;t collapse in Firefox. Then, add a background image that repeats on the Y-axis (vertically). So, if you have a drop shadowed border, or even a simple 1 pixel border, you would create the image in your image editing program (Photoshop, Illustrator, etc.) and then just adjust the background-position of the image in your CSS to place it exactly where you want it. Since this DIV is essentially behind your two columns, holding both of them, you cannot have a background color on your columns, as it would block the image from showing up.</p>
<p><strong>Keep in mind<br />
</strong>You might think this could be done with a one pixel-border on one of the columns, but remember, one of the columns is not going to extend to the bottom, so the border method won&#8217;t work without some serious CSS hacks and workarounds. You&#8217;re creating the illusion that the short column is extending to the bottom by positioning the background image in a place where it mimics the short column&#8217;s border. Except, unlike the short column, your outer container (the container holding the container, if you will) is always going to extend to the bottom, thus creating the illusion of a two column layout where the columns are always equal, regardless of content. And best of all, either of the two columns could extend larger than the other, and the illusion would still work.</p>
<p><strong>Overall, a very easy solution with limited drawbacks<br />
</strong>This really is an easy to implement solution that can work on many CSS layouts, and doesn&#8217;t have too many drawbacks, other than adding some non-semantic code to your markup and (somewhat) complicating your DIV structure.</p>
<p>So if you&#8217;re in need of a hack-free quick fix to a two-column layout, this is a good solution and will work in virtually every browser and platform.</p>
<p><a href="/equal-columns.html" title="Easy Equal Columns with CSS demo">View the demo page</a>, to see this simple, yet effective, solution in action.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/easy-equal-columns-with-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cleaner HTML by Avoiding Attributitis</title>
		<link>http://www.impressivewebs.com/cleaner-html-by-avoiding-attributitis/</link>
		<comments>http://www.impressivewebs.com/cleaner-html-by-avoiding-attributitis/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 06:37:42 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/cleaner-html-by-avoiding-attributitis/</guid>
		<description><![CDATA[Did I just invent that word? Most developers using CSS layouts have likely heard of &#8220;divitis&#8221; (using far too many DIVs in your markup). But what about &#8220;attributitis&#8221; (or, Attribute-itis, if you will) &#8212; the distant cousin of divitis? I didn&#8217;t bother googling that word to see if anyone else has used it; I&#8217;m hoping [...]]]></description>
			<content:encoded><![CDATA[<p>Did I just invent that word? Most developers using CSS layouts have likely heard of &#8220;divitis&#8221; (using far too many DIVs in your markup). But what about &#8220;attributitis&#8221; (or, Attribute-itis, if you will) &#8212; the distant cousin of divitis? I didn&#8217;t bother googling that word to see if anyone else has used it; I&#8217;m hoping I&#8217;ve coined it! I thought of it this morning while helping a coworker debug a CSS problem. It struck me that the class and ID attributes that are commonly added to HTML tags can really get out of hand if they aren&#8217;t controlled properly. Let&#8217;s discuss a few points that will ensure cleaner code and better future development time through the practice of avoiding attributitis.</p>
<p><strong>Fewer attributes further enhance clean code</strong><br />
Often because we want to easily identify our styles in our stylesheet, when we code an HTML tag, our first instinct is to add a &#8220;class&#8221; or &#8220;id&#8221; attribute. At times I do it without thinking. But think of how much cleaner the code would be with no class or ID on that tag? That&#8217;s right &#8212; just a plain ol&#8217; tag. And when you combine this with the avoidance of divitis, you can easily see the contrast:</p>
<p><strong>With divitis and attributitis&#8230;</strong></p>
<p class="code">&lt;div class=&#8221;my_ul_holder&#8221;&gt;<br />
&lt;ul class=&#8221;my_ul&#8221;&gt;<br />
&lt;li class=&#8221;my_list_item&#8221;&gt;Example Text&lt;li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;</p>
<p><strong>And Without&#8230;</strong></p>
<p class="code">&lt;ul&gt;<br />
&lt;li&gt;Example Text&lt;li&gt;<br />
&lt;/ul&gt;
</p>
<p>I know what you&#8217;re thinking: It&#8217;s not always that easy &#8212; sometimes you have to apply classes and attributes in order to differentiate. But, to some degree, it can be avoided.</p>
<p><strong>Have site-wide defaults for commonly used tags</strong><br />
By now you should be using a CSS reset to revert all your site&#8217;s styles to the bare minimum. If you&#8217;re not, do yourself a favor and research the topic and start using a reset. It&#8217;s extremely helpful for cross-browser compatibility. But further down in your style sheet, you should have a section of code that contains the site&#8217;s custom default styles for various HTML tags like H1, H2, P, UL, and others.</p>
<p>For example, if you know you&#8217;re going to have about a dozen unordered lists on the site, styled exactly the same way, there is no need to put class=&#8221;my_unordered_list&#8221; on every one of them. Just leave the class attribute off completely, and style your UL element to reflect this in your style sheet.</p>
<p>Even if you want to apply a different style to one of them, you can simply do so through the DIV hierarchy that you&#8217;ve already likely created in your XHTML. So instead of of adding</p>
<p class="code">class=&#8221;other_unordered_style&#8221;</p>
<p>to your UL tag, you can leave the UL naked and use something like this in your CSS:</p>
<p class="code">
#footer ul {<br />
// enter styles here<br />
}
</p>
<p>to declare a different set of styles on the single unordered list that appears in your footer.</p>
<p><strong>Cleaner markup and better site performance</strong><br />
This will leave your HTML code clean, semantic, and (somewhat) attribute-free. True, this will likely add a few kilobytes to your CSS file. But since CSS is cached by your browser, it will work out better overall for your site&#8217;s performance. With a little careful forethought, XHTML and CSS can easily be stripped down to its bare bones &#8212; or close to it &#8212; and your site will still look as beautiful as it was intended from a visual perspective, and will no doubt be easier to maintain in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/cleaner-html-by-avoiding-attributitis/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Impressive Links of the Week (July 24/08)</title>
		<link>http://www.impressivewebs.com/impressive-links-of-the-week-july-2408/</link>
		<comments>http://www.impressivewebs.com/impressive-links-of-the-week-july-2408/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 06:01:45 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[Impressive Links of the Week]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/impressive-links-of-the-week-july-2408/</guid>
		<description><![CDATA[Homer Simpson&#8217;s email address hacked
Hi-tech is turning us all into time-wasters
Evoking Curiosity &#8212; a Form of Marketing
What Boston and Nirvana Can Teach You About Finding Your Winning Difference
50 Must Read Resources for Incredible Web Design
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.theregister.co.uk/2008/07/14/homer_simpson_botnet_hack/" rel="external">Homer Simpson&#8217;s email address hacked</a></p>
<p><a href="http://www.guardian.co.uk/science/2008/jul/20/psychology.mobilephones/print" rel="external">Hi-tech is turning us all into time-wasters</a></p>
<p><a href="http://archive.smallbusinessnewz.com/2008a/0617.html" rel="external">Evoking Curiosity &#8212; a Form of Marketing</a></p>
<p><a href="http://www.copyblogger.com/boston-nirvana-winning-difference/" rel="external">What Boston and Nirvana Can Teach You About Finding Your Winning Difference</a></p>
<p><a href="http://elitebydesign.com/50-must-read-resources-for-incredible-web-design/" rel="external">50 Must Read Resources for Incredible Web Design</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/impressive-links-of-the-week-july-2408/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SEO Rules vs. SEO Concepts</title>
		<link>http://www.impressivewebs.com/seo-rules-vs-seo-concepts/</link>
		<comments>http://www.impressivewebs.com/seo-rules-vs-seo-concepts/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 01:18:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Best Practices]]></category>

		<category><![CDATA[Internet Marketing]]></category>

		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/seo-rules-vs-seo-concepts/</guid>
		<description><![CDATA[Often times, web development blog posts recite easy to understand, step-by-step instructions on how to optimize XHTML code for SEO. Generally, I think this is good. The fact is, web users have low attention spans, and usually the best way to get a message across is to state it simply in point form. But in [...]]]></description>
			<content:encoded><![CDATA[<p>Often times, web development blog posts recite easy to understand, step-by-step instructions on how to optimize XHTML code for SEO. Generally, I think this is good. The fact is, web users have low attention spans, and usually the best way to get a message across is to state it simply in point form. But in order for developers and internet marketers to enhance their abilities over the long haul, more is necessary, as we&#8217;ll discuss. With this article I&#8217;ll show how online writers and readers alike can become part of a long-term commitment to making the web a better place to surf.</p>
<p><strong>Why lists of &#8220;rules&#8221; can often fail in the long run</strong><br />
It is often said that behind every rule there is an underlying principle. Let&#8217;s illustrate this with an example. When a blog post tells a user to use H1 tags for headings instead of something clunky like</p>
<p>&lt;div class=&#8221;header_main&#8221;&gt;My Example Heading&lt;/div&gt;</p>
<p>then the whole reason behind the necessity of the H1 may become lost on the reader, especially a reader that is new to web development, or is picking it up simply as a hobby. In such a case, the reader needs to understand <em>why</em> such an approach to markup is necessary &#8212; not just that it <em>is</em> necessary. Simply stated, websites are more findable, search engine friendly, and faster loading when the markup is semantic. Now, I&#8217;m not going to go into the details of defining &#8220;semantic markup&#8221; here. That is a topic for another post. But I&#8217;m emphasizing that the rules can easily be forgotten over the long run if the readers are not understanding the reasons behind certain SEO techniques, best practice coding, and other standards-based ideas.</p>
<p><strong>Online writers and readers both play a role</strong><br />
So writers should be more aware of the effect their content will have on the future of web development, SEO, and the internet in general. We as writers should strive to teach others based on strong foundations and concepts that are clearly understood. Likewise, we as readers need to strive to read and learn from others based on strong foundations and concepts that are clearly explained. Both sides have a significant role to play in what the web will be like down the road.</p>
<p><strong>Readers and writers, aim for a stronger foundation of learning</strong><br />
Therefore, in conclusion, while the typical bulleted lists and point-form rule-sets have their place and can be very useful, the more important &#8220;reasons behind the rules&#8221; are what will truly enhance a reader&#8217;s development as a web site professional, and will, by extension, make the web a better place for all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/seo-rules-vs-seo-concepts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Impressive Links of the Week (July 13/08)</title>
		<link>http://www.impressivewebs.com/impressive-links-of-the-week-july-1308/</link>
		<comments>http://www.impressivewebs.com/impressive-links-of-the-week-july-1308/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 03:44:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Impressive Links of the Week]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/impressive-links-of-the-week-july-1308/</guid>
		<description><![CDATA[Cracking Google&#8217;s 1,000 Page Barrier
Doubtsourcing
The Myopic Web Developer
Do-it-yourself SEO tips from Matt Cutts
Do browsers need a &#8216;best-before&#8217; date?
]]></description>
			<content:encoded><![CDATA[<p><a rel="external" href="http://www.seomoz.org/blog/cracking-googles-1000-page-barrier">Cracking Google&#8217;s 1,000 Page Barrier</a></p>
<p><a rel="external" href="http://www.doubtsourcing.com">Doubtsourcing</a></p>
<p><a rel="external" href="http://www.myintervals.com/blog/2008/07/01/the-myopic-web-developer/">The Myopic Web Developer</a></p>
<p><a rel="external" href="http://www.webpronewsca.com/2008a/0702.html">Do-it-yourself SEO tips from Matt Cutts</a></p>
<p><a rel="external" href="http://www.builderau.com.au/news/print.htm?TYPE=story&amp;AT=339290240-339028227t-320000982c">Do browsers need a &#8216;best-before&#8217; date?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/impressive-links-of-the-week-july-1308/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tips for Better CSS Files</title>
		<link>http://www.impressivewebs.com/tips-for-better-css-files/</link>
		<comments>http://www.impressivewebs.com/tips-for-better-css-files/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 05:51:21 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[Best Practices]]></category>

		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/tips-for-better-css-files/</guid>
		<description><![CDATA[While working on medium to fairly large websites, I&#8217;ve recently found it helpful to apply certain coding practices in my CSS files to help readability, and to ensure that any future developers (including me) will have little difficulty editing the CSS code. Since my main CSS files nowadays often end up being anywhere from 1000 to 2000 [...]]]></description>
			<content:encoded><![CDATA[<p>While working on medium to fairly large websites, I&#8217;ve recently found it helpful to apply certain coding practices in my CSS files to help readability, and to ensure that any future developers (including me) will have little difficulty editing the CSS code. Since my main CSS files nowadays often end up being anywhere from 1000 to 2000 lines long, here are some quick tips that I think help CSS code to be more readable and web developer-friendly:</p>
<p><strong>1. Indent CSS using the same structure as the HTML</strong><br />
I don&#8217;t know why this isn&#8217;t more prevalent (at least it&#8217;s not written about a lot online), but I recently started doing this after viewing an online video from a fairly popular CSS developer and blogger. Having the Web Developer Tool Bar in Firefox helps track down CSS fairly quickly, I find the indenting actually assists the development of the site itself. It&#8217;s much easier to read the CSS and see what the code is doing, even as you type. Especially is this important if the project spans many weeks or months, as the structure of the HTML and how it relates to the CSS styles can easily go forgotten. So, indent your CSS in a hierarchical manner so you can easily match a nested section of HTML to its CSS counterpart.</p>
<p><strong>2. Use lots of spacing and comments</strong><br />
The comments are generally a no-brainer. All good code is commented. But the spacing is simply for readability. I know, the more white space you have, the more bandwidth it&#8217;ll cost you, but you can always remove the white space towards the end of the project, if necessary. And spacing should not just include that which occurs as entire lines between ID and Class groupings &#8212; I personally like to see white space in between all the selectors and colons as well as between grouped styles that are organized all on one line (as opposed to one on each line within the group, as seems to be most common). So do this:</p>
<p><code>#example_section {<br />
float: left;<br />
width: 300px;<br />
height: 400px;<br />
background: url(../images/example_image.jpg) no-repeat 0 0;<br />
}</code><code>.example_section_2 {<br />
color: #fff;<br />
line-height: 14px;<br />
}</p>
<p></code>Not this:</p>
<p><code><br />
#example_section{<br />
float:left;<br />
width:300px;<br />
height:400px;<br />
background:url(../images/example_image.jpg) no-repeat 0 0;<br />
}<br />
.example_section_2{<br />
color:#fff;<br />
l ine-height: 14px;<br />
}<br />
</code></p>
<p>The difference is subtle in this short example, but the first example is much easier to read when applied to a 1000+ line CSS file.</p>
<p><strong>3. Always use external files to hold your CSS code</strong><br />
This is a basic tip, and all good developers should do this. If your main CSS file applies to dozens, or even hundreds, of content pages, then your pages will load faster with an external file because all subsequent page loads will get the CSS code from your browser&#8217;s cache. Thus the CSS will only load once, saving bandwidth and improving user wait times. And of course, the other benefit is that the CSS stays separate from the HTML, the same way the JavaScript should, keeping the 3 layers of front end web development clean and separate.</p>
<p><strong>4. Keep default styles and link styles near the top</strong><br />
For me, this one is a bit of a personal preference. I like to know that all my default styles (CSS reset code, heading styles, unordered list styles, hyperlink styles) are easily accesible near the top of the CSS document. After all, those styles are not always part of the HTML hierarchy, and often won&#8217;t fit well with the DIVs, custom paragraph tags and the like. So when I do a high-speed scroll through my CSS code, I know that when I get to a certain section near the top (in my case the section that styles all hyper links on the page), then I know that all my default styles have ended and the hierarchical section begins. And with some effective commenting, the rest of the document can be just as easy to scroll through and find a particular section.</p>
<p><strong>5. Use shorthand notation</strong><br />
This will improve your CSS code immensely, as well as save a few kilobytes in bandwidth. Basically it means putting related CSS styles on one line instead of declaring them all using separate selectors. So for example, here is a long-winded example of applying a background image to a DIV tag:</p>
<p><code><br />
#my_example {<br />
background-image: url(../example_image.jpg);<br />
background-image: background-color: transparent;<br />
background-image: background-repeat: no-repeat;<br />
background-image: background-position: 0 0;<br />
}<br />
</code></p>
<p>And here is the better shorthand version of the above code:</p>
<p><code><br />
#my_example {<br />
background-image: url(../example_image.jpg) transparent no-repeat 0 0;<br />
}<br />
</code></p>
<p>Much easier to read, easier to maintain, and the order of the values doesn&#8217;t matter, so you can make the reference to the JPEG image the last value if you prefer.</p>
<p><strong>Benefits while you develop as well as in the future</strong><br />
The benefits reaped from these tips will not only help developers working on the site in the future, but will help <em>you</em> during the process of developing the site. Often, client requests and other project details interrupt the workflow. That can put a damper on your mental ability to stay focused on how you&#8217;ve organized your code. To ensure that your code doesn&#8217;t become an unintelligible mess, keep things neat and organized and you&#8217;ll see the benefits now as well as in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/tips-for-better-css-files/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Impressive Links of the Week (July 3/08)</title>
		<link>http://www.impressivewebs.com/impressive-links-of-the-week-july-308/</link>
		<comments>http://www.impressivewebs.com/impressive-links-of-the-week-july-308/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 04:47:39 +0000</pubDate>
		<dc:creator>Impressive Webs</dc:creator>
		
		<category><![CDATA[Impressive Links of the Week]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/impressive-links-of-the-week-july-308/</guid>
		<description><![CDATA[How to get Cross Browser Compatibility Every Time
&#8216;Shake-up&#8217; for internet proposed
The 10 Commandments of Web Design
Google&#8217;s Improved Flash indexing
Which Javascript frameworks are the most common?
]]></description>
			<content:encoded><![CDATA[<p><a href="http://anthonyshort.com.au/blog/comments/how-to-get-cross-browser-compatibility-everytime/" rel="external">How to get Cross Browser Compatibility Every Time</a></p>
<p><a href="http://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/technology/7468855.stm" rel="external">&#8216;Shake-up&#8217; for internet proposed</a></p>
<p><a href="http://www.businessweek.com/print/innovate/content/jun2008/id20080623_750025.htm" rel="external">The 10 Commandments of Web Design</a></p>
<p><a href="http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html" rel="external">Google&#8217;s Improved Flash indexing</a></p>
<p><a href="http://royal.pingdom.com/?p=305" rel="external">Which Javascript frameworks are the most common?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/impressive-links-of-the-week-july-308/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
