<?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>Sickdesigner.com &#187; html-css</title>
	<atom:link href="http://sickdesigner.com/index.php/category/html-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://sickdesigner.com</link>
	<description>The work &#38; play of Radu Chelariu</description>
	<lastBuildDate>Sun, 13 May 2012 16:22:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Masonry CSS or Getting awesome with CSS3</title>
		<link>http://sickdesigner.com/index.php/2011/html-css/masonry-css-getting-awesome-with-css3/</link>
		<comments>http://sickdesigner.com/index.php/2011/html-css/masonry-css-getting-awesome-with-css3/#comments</comments>
		<pubDate>Tue, 03 May 2011 17:38:31 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[column-count]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[masonry]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1661</guid>
		<description><![CDATA[Gotta tell you folks: this one&#8217;s been bugging me for a week now. I&#8217;m sure everyone is familiar with David DeSandro&#8216;s awesome jQuery plugin, Masonry. Well, what this is is two things. First, it&#8217;s an homage to David himself and the awesome work that he does. Second, it&#8217;s a kick ass, super simple CSS technique [...]]]></description>
			<content:encoded><![CDATA[<p>Gotta tell you folks: this one&#8217;s been bugging me for a week now. I&#8217;m sure everyone is familiar with <a title="David's website" href="http://desandro.com/" target="_blank">David DeSandro</a>&#8216;s awesome jQuery plugin, <a title="jQuery Masonry" href="http://desandro.com/resources/jquery-masonry/" target="_blank">Masonry</a>. Well, what this is is two things. First, it&#8217;s an homage to <a title="David's Twitter" href="http://twitter.com/#!/desandro" target="_blank">David</a> himself and the awesome work that he does. Second, it&#8217;s a kick ass, super simple CSS technique that mimics what Masonry does. With just CSS.</p>
<p>For those unfamiliar with jQuery Masonry, what it, essentially, does is mimic a vertical float, not just the regular horizontal kind. In fact, I used it for the homepage of my blog (where the different posts are displayed).</p>
<p>So, what&#8217;s the trouble with CSS? It&#8217;s quite simple: there is no CSS model that takes into account vertical alignment. Period. I swear I tried everything. From floats, to positions, displaying inline, run-in, you name it, I tried it. But there was this midget in my head telling me that there must be a solution. And, wouldn&#8217;t you know it, BAM, two days ago, while eating an omelet, of all things, it struck me.</p>
<h4>The all mighty columns</h4>
<p>The solution is so simple that it gave me a brain freeze: CSS columns. Granted, their purpose is to display text in columns like a newspaper, but their display mode is exactly what&#8217;s needed to recreate the Masonry effect. But let&#8217;s get down to the code. What do you need, you say?</p>
<p><strong>A container and some children</strong><br />
<code><br />
&lt;div&gt;<br />
&lt;a href="#"&gt;Whatever stuff you want to put in here. Images, text, movies, what have you. No, really, anything!&lt;/a&gt;<br />
...and so on and so forth ad nauseum.<br />
&lt;/div&gt;<br />
</code></p>
<p><strong>The CSS magic</strong><br />
<code><br />
div{<br />
-moz-column-count: 3;<br />
-moz-column-gap: 10px;<br />
-webkit-column-count: 3;<br />
-webkit-column-gap: 10px;<br />
column-count: 3;<br />
column-gap: 10px;<br />
width: 480px; }</code><br />
<code><br />
div a{<br />
display: inline-block; /* Display inline-block, and absolutely NO FLOATS! */<br />
margin-bottom: 20px;<br />
width: 100%; }<br />
</code></p>
<p>An interesting fact: the width of the elements within the columned container is not relative to the width of the parent, but the width of the column. In the case of the example above width: 100% actually translates to 150px, not 480px (the width of the parent).</p>
<h4>Fallbacks and browser compatibility</h4>
<p>Of course, our friends at Microsoft have taken good care to not provide support for CSS columns. Not even in IE9! In this case, I recommend slapping in David&#8217;s awesome plugin like so:<br />
<code><br />
&lt;!--[if lte IE 9]&gt;<br />
&lt;script type="text/javascript" src="js/jquery.masonry.min.js"&gt;&lt;/script&gt;<br />
&lt;![endif]--&gt;<br />
</code><br />
In Microsoft&#8217;s defense, for what it&#8217;s worth, this does work (well, even!) in the IE10 Platform Preview. Hopefully they&#8217;ll leave support for columns in the final version, which could be released as early as next year.</p>
<p>I&#8217;m guessing there&#8217;s no point in mentioning that this works (brilliantly) in Gecko and Webkit browsers (Mozilla, Chrome, Safari). Opera does weird things that I don&#8217;t quite understand yet, but does an acceptable job of rendering columns (it just has trouble with the gaps and all).</p>
<p><em>This is usually where you&#8217;d find a link to a demo page. This time, however, I direct you to the homepage of this site. Yes, I used it live. I have that much confidence in this. Enjoy, kids!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/index.php/2011/html-css/masonry-css-getting-awesome-with-css3/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
		<item>
		<title>Understanding the CSS display property</title>
		<link>http://sickdesigner.com/index.php/2010/html-css/understanding-the-css-display-property/</link>
		<comments>http://sickdesigner.com/index.php/2010/html-css/understanding-the-css-display-property/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 04:37:12 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[about]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[inline-block]]></category>
		<category><![CDATA[list-item]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[understand]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1187</guid>
		<description><![CDATA[One of the most powerful &#38; useful properties in all CSS is, without a doubt, the display property. And yet, it is also one of the least well known, especially by those just starting out with CSS. In this post I&#8217;ll try to shed some light on this little gem. A bit of an introduction [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most powerful &amp; useful properties in all CSS is, without a doubt, the display property. And yet, it is also one of the least well known, especially by those just starting out with CSS. In this post I&#8217;ll try to shed some light on this little gem.<span id="more-1187"></span></p>
<h4>A bit of an introduction</h4>
<p>The W3C specifies that the initial display value of all elements is inline. Some of you may raise a brow in disbelief, and with good reason. What they didn&#8217;t specify is that the display property is sensitive to other properties. That is to say that some elements automatically change their default display value according to other properties they might have applied to them.</p>
<p>Practical example: <strong>divs</strong> and <strong>ems</strong>. By default, they both act as inline elements. Add width/height or float to them and you start to see a difference. While the ems keep being displayed as inline elements, the divs are rendered as block elements, which is what we&#8217;re used to seeing.<span style="color: #ff0000;"><strong> </strong></span></p>
<p>Because of this slightly esoteric behavior of the display property, I find it easier to think of divs and forms, etc. as block level elements, while all the rest as inline. Most of the time, the default values are sufficient and adequate but there are times when maintaining semantic code while having a specific element behavior requires a bit of display tinkering.</p>
<h4>So, what&#8217;s the big deal?</h4>
<p>Instead of writing a lengthy and, otherwise, boring post about how this value does this and that value does that, I went a bit further and made a demo page showcasing all the 17 possible display values in a retro kind of Dharma Initiative interface. Yeah, yeah, Lost is over, boo-hoo.</p>
<p><img class="alignnone size-full wp-image-1220" title="big-display-pic" src="http://sickdesigner.com/wp-content/uploads/2010/06/big-display-pic.jpg" alt="" width="680" height="475" /></p>
<p>So, clicky on the demo button and have yourself a merry time (best viewed with Firefox 3.6). And don&#8217;t forget to get back here and leave a comment!</p>
<p><a class="demo" href="http://sickdesigner.com/resources/display-property-demo/index.html" target="_blank">See the demo</a></p>
<p><em class="end">Hopefully, you had a good time playing around with the virtual display keyboard and, who knows, maybe even learned a thing or two about the mother of all structural CSS properties &#8211; display.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/index.php/2010/html-css/understanding-the-css-display-property/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>The Solar Method (of building websites)</title>
		<link>http://sickdesigner.com/index.php/2010/html-css/the-solar-method-of-building-websites/</link>
		<comments>http://sickdesigner.com/index.php/2010/html-css/the-solar-method-of-building-websites/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 15:05:00 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[building]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[solar]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1191</guid>
		<description><![CDATA[In the past years, web design as a profession has grown immensely from a wee toddler to a field well into its adolescence. We now have standards and recommendations, best practices and various ways of testing the rigor of our work. Web design is growing ever closely to the rank of more traditional, elite professions. [...]]]></description>
			<content:encoded><![CDATA[<p>In the past years, web design as a profession has grown immensely from a wee toddler to a field well into its adolescence. We now have standards and recommendations, best practices and various ways of testing the rigor of our work.</p>
<p>Web design is growing ever closely to the rank of more traditional, elite professions. Yet, unlike traditional professions, web design is not subject to a standard practice model. We each build websites according to what we think is the best, or sometimes the fastest, approach.</p>
<p>Perhaps you read some books when you started out with web design that explained certain methods of the building process, I know I have. And, perhaps, like me, you too, disappointingly, found that most of these books derive solutions that are either contrived, redundant, illogical or do not withstand the test of time.<br />
In this post, I&#8217;ll try to express what I believe to be a healthy candidate for the title of <strong>Website Building Standard Method</strong>. I call it the <em>Solar Method (of building websites)</em>.</p>
<p><img class="alignnone size-full wp-image-1193" title="solarmethod-header-inner" src="http://sickdesigner.com/wp-content/uploads/2010/06/solarmethod-header-inner.jpg" alt="" width="680" height="680" /></p>
<p>As the name implies, my Solar Method is derived from solar systems, more precisely, from the process of forming a solar system. Daunting as it may seem, it&#8217;s time for a little bit of cosmology.</p>
<h4>The Cosmological Background</h4>
<blockquote><p>For objective reasons I shall use our own solar system as a basis for my theory. This in no way affects the methodology of the proposed theory. Also note that this is a very brief description of the history of our solar system and is meant to provide insight into the background of the proposed method.</p></blockquote>
<p>Our solar system began its life as a piece of a giant molecular cloud, known as a pre-solar nebula. Upon gravitational collapse, this fragment of the nebula condensed into a proto-star surrounded by debris, known as a solar nebula.<br />
It is from this solar nebula that planets began forming, through the process of <a href="http://en.wikipedia.org/wiki/Accretion_%28astrophysics%29" target="_blank">accretion</a>. Further down the timeline, through collisions and attractions, the solar system stabilized into the structure we see today.<br />
Snoozing already? Don&#8217;t worry, it gets better.</p>
<h4>Identifying Parallels</h4>
<p>At the center of any website lies the all mighty HTML. It&#8217;s the main ingredient we feed browsers and it powers the better part of the web. HTML is the single most essential component of websites. Without it, most other web technologies are useless. In other words <strong>HTML is our Sun</strong>. And technologies such as CSS, Javascript, PHP, etc. are planets revolving around our HTML Sun.</p>
<p><em>While there are well founded reasons to claim that technologies such as Java or Flash are equal in importance to HTML, this method is aimed at web designers, not Java or Flash designers, so I&#8217;ll refrain from pursuing this line of investigation.</em></p>
<h4>The Solar Method</h4>
<p>Terms such as progressive enhancement, a clear focus on accessibility and semantics as well as a clear separation of markup, styling and interaction are driving factors in today&#8217;s web environment. These factors are also the driving factors behind this proposed method.</p>
<p><em>Q: what is the most simple solar system? A: a sun.</em></p>
<p>Delivering content to the lowest technological denominator is the starting point of this method. We find this lowest denominator by eliminating all non-essential web technologies: a browser that has disabled CSS, Javascript, Flash and Java, reading a website set on a server that does not allow for anything other than simple HTML delivery. It is in this harsh environment that we must first place ourselves.</p>
<p>This method tries to provide the necessary mindset through which we can  build websites that manage to overcome the many obstacles of this desert environment and yet achieve our goal of delivering meaningful and complete content.</p>
<p>So let&#8217;s look at a very clear way of determining the steps one should undergo in building websites with the <strong>Solar Method</strong>:</p>
<ol>
<li><strong>HTML</strong><br />
First, create the HTML<strong> </strong>content without any images or other media. This is, by far, the most crucial point in developing a website. Clean, semantic &amp; meaningful HTML means your job later on will not only be easier, but also more satisfying.</li>
<li><strong>Media &amp; CSS</strong><br />
Add any necessary media (images, sound, animation etc.) to the HTML code and also CSS styling to match the design.</li>
<li><strong>Javascript</strong><br />
Add Javascript interaction if needed.</li>
<li><strong>Programming</strong><br />
Add any necessary programming (PHP, Ruby, ASP<strong> </strong>etc.) code.</li>
<li><strong>Flash</strong><br />
Add any necessary Flash code.</li>
</ol>
<p><strong>At each step remember to make the website functional and meaningful as if no other technology would be added.</strong></p>
<p>At this point you might be saying to yourself: &#8220;<em>but this isn&#8217;t that complicated!</em>&#8220;; and you&#8217;re right, it is not. This method is not meant to be complicated, it is meant to guide you in a logical way to building websites. Adding orbiting technologies around the underlying HTML base like planets around the Sun is, or should be, a natural impulse driven by reason and the aforementioned key factors in modern web design: progressive enhancement, accessibility, semantics and separation.</p>
<p>My explanation for the Solar Method may seem overly complicated, considering its easy to follow guidelines. The lengthy preamble was a conscious decision, of course, and it is meant to underline the importance of our work as web designers.</p>
<p><em class="end">Our craft has grown and so should we, as it&#8217;s practitioners, beyond the proverbial &#8220;<em>code monkey</em>&#8221; and realize that our work is of great importance and we are fortunate to be able to call ourselves <strong>the builders of the Internet</strong>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/index.php/2010/html-css/the-solar-method-of-building-websites/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>HTML5 Starter Pack &#8211; a sick freebie</title>
		<link>http://sickdesigner.com/index.php/2010/html-css/html5-starter-pack-a-sick-freebie/</link>
		<comments>http://sickdesigner.com/index.php/2010/html-css/html5-starter-pack-a-sick-freebie/#comments</comments>
		<pubDate>Mon, 31 May 2010 04:08:09 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[cufon]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[pack]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[starter]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[valid]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1149</guid>
		<description><![CDATA[Normally, I&#8217;m a big adept of not using templates for presets for pretty much anything I do. But, I must admit, there are tasks that are so trivial, so mundane and so bleedin&#8217; boring that just scream for a template. The Starter Pack, as I call it, is a bit different than a template. I [...]]]></description>
			<content:encoded><![CDATA[<p>Normally, I&#8217;m a big adept of not using templates for presets for pretty much anything I do. But, I must admit, there are tasks that are so trivial, so mundane and so bleedin&#8217; boring that just scream for a template.</p>
<p>The Starter Pack, as I call it, is a bit different than a template. I built it with one guiding principle: scalability. As a result, you can use this to get started on your portfolio page or the next Facebook.</p>
<p>Of course, the coding part is all HTML5, cross-browser, of course, but I&#8217;ve also gone and included a basic Photoshop template to get you started on designing the page. Just to lure you in to it, here&#8217;s a list of a few major features of the pack:</p>
<ul>
<li>Cross browser (IE6 is supported as well)</li>
<li>Valid HTML5 (that&#8217;s right; valid, baby!)</li>
<li>Tablet/Netbook ready (via CSS media queries)</li>
<li>jQuery (from the Google CDN)</li>
<li><span style="text-decoration: line-through;">Cufón ready</span> @font-face ready (Lobster &amp; Raleway fonts included from <a href="http://www.fontsquirrel.com/" target="_blank">FontSquirel</a> )</li>
<li>Some structural reusable classes</li>
</ul>
<p>I&#8217;ve set up a separate project page (built with this Starter Pack itself) to showcase some of the features in the pack, so just click the link below (or the screenshot of the project page), read a bit about it and if you like it, I&#8217;d really appreciate a comment here.</p>
<p><img class="alignnone size-full wp-image-1164" title="project-page-f" src="http://sickdesigner.com/wp-content/uploads/2010/05/project-page-f1.jpg" alt="" width="680" height="857" /></p>
<p><a class="demo" href="http://sickdesigner.com/resources/HTML5-starter-pack/index.html" target="_blank">Download the Starter Pack</a></p>
<h4>UPDATE</h4>
<p>As some of you have pointed out, I was in error by not pushing for @font-face. Thus, version 2.0 of the pack is up and running. Just click the download link and you&#8217;ll be up and running! Thanks everyone for the awesome support and huge help in making this a pretty cool little pack.</p>
<p><em class="end">If you feel I&#8217;ve missed something in this pack, or that, perhaps, some areas can be improved, please, speak your mind in the comments area. I promise I won&#8217;t ignore you&#8230;much (just kidding!).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/index.php/2010/html-css/html5-starter-pack-a-sick-freebie/feed/</wfw:commentRss>
		<slash:comments>83</slash:comments>
		</item>
		<item>
		<title>The definitive guide to formatting CSS</title>
		<link>http://sickdesigner.com/index.php/2010/html-css/the-definitive-guide-to-formatting-css/</link>
		<comments>http://sickdesigner.com/index.php/2010/html-css/the-definitive-guide-to-formatting-css/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 05:09:03 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[attributes]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[indent]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[selectors]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=924</guid>
		<description><![CDATA[As web designers, we like certain things done a certain way and the way we write our CSS is probably at the top of that list. So today I&#8217;ll try to show you a few ways to write better CSS, not just for yourself, but also for others. Right off the bat, let me say [...]]]></description>
			<content:encoded><![CDATA[<p>As web designers, we like certain things done a certain way and the way we write our CSS is probably at the top of that list. So today I&#8217;ll try to show you a few ways to write better CSS, not just for yourself, but also for others.<span id="more-924"></span></p>
<blockquote class="inner"><p>Right off the bat, let me say that I do not proclaim (not anymore) that there&#8217;s a right way or a wrong way to format your CSS. I&#8217;ve come to the (hopefully mature) conclusion that the way one formats styles should be based on the type of project at hand. And this the basis of this post.</p></blockquote>
<p>Gone are the days of small, static websites that take about a day to code and have less than 500 lines of CSS in them. Nowadays, we find ourselves working with blogs, CMSs, frameworks, web applications, web shops and generally huge friggin projects. The CSS we write today is almost never under 1000 lines and when you&#8217;re dealing with that much code, you need to be able to maintain it easily.</p>
<p>Most web designers have their own, preferred, way of writing. And they stick to it no matter what. I used to do that myself. But the more diverse your projects are, the more you&#8217;ll start to notice the pitfalls of your preferred technique. And then you might realize that your own, personal, style of writing stylesheets isn&#8217;t really that important, when it hinders to the maintainability of the project.</p>
<p>I think it goes without saying that in this post I will completely avoid the possibility of &#8220;inline&#8221; and &#8220;in head&#8221; styles. These two options aren&#8217;t really an option because they both mean polluting your markup, so I&#8217;ll politely tell them to get the fudge out of the equation. If any of you have a problem with that, take it down to the comments section, where complaints are more than welcomed.</p>
<p>I&#8217;ve got a system here, so, we&#8217;ll start with the big stuff (file management) and end with the really small stuff (the curly bracket &#8211; quite poetically).</p>
<h4>Single file vs multiple files</h4>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;CSS3 Vignette&lt;/title&gt;<br />
&lt;link rel="stylesheet" href="css/style.css" type="text/css" media="screen" /&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
...<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p><em>The single file approach</em>, like the code above, is most suitable for small projects. I&#8217;d say somewhere under 1500 lines of CSS is the limit, at least for me. As long as you keep your styles organized, this approach should work out ok.</p>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;CSS3 Vignette&lt;/title&gt;<br />
&lt;link rel="stylesheet" href="css/reset.css" type="text/css" media="screen" /&gt;<br />
&lt;link rel="stylesheet" href="css/structure.css" type="text/css" media="screen" /&gt;<br />
&lt;link rel="stylesheet" href="css/type.css" type="text/css" media="screen" /&gt;<br />
&lt;link rel="stylesheet" href="css/colors.css" type="text/css" media="screen" /&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
...<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p><em>The multiple file approach</em> is a good choice when working on larger, more complex projects. It&#8217;s also a good idea to use this approach when you have a project that will have a lot of updates. Being organized like this and keeping different sections separate can make your job a lot easier.</p>
<p><code>@import url('css/reset.css');<br />
@import url('css/structure.css');<br />
@import url('css/colors.css');<br />
@import url('css/typography.css');</code></p>
<p>The direct approach to multiple stylesheets isn&#8217;t the only option. You can use the <em>@import</em> rule to put together your multiple CSS files within a single, main stylesheet.<br />
The downside with using multiple stylesheets is that they add to the number of HTTP requests made for the page, which slows down your page load times a bit. I wouldn&#8217;t worry too much about it though. Most of the time you can get away with it and still have good performance on your pages. Compared with database queries, javascript calls or even image load, the downtime caused by large CSS files is, mostly, insignificant.<br />
If you&#8217;re totally anal-retentive about page load times, however, you can use a <a href="http://dimebrain.com/2008/03/a-better-css-mi.html" target="_blank">stylesheet minifier</a> to decrease the size of your CSS files. More often than not, you can slim them down to at least 60% of their original size.</p>
<h4>To indent or not to indent</h4>
<p><code><br />
p{ font: normal normal 1.2em Arial, Verdana, Tahoma, sans-serif; }<br />
p span{ color: tan; }<br />
</code></p>
<p>Not indenting your CSS selectors at all is usually a bad idea and I really can&#8217;t see one upside to it. So don&#8217;t be a naughty Nancy and press that Tab key every now and then.</p>
<p><code>#block{ float: left; margin: 0 20px 0 0; width: 200px; }<br />
p{ font: normal normal 1.2em Arial, Verdana, Tahoma, sans-serif; }<br />
p span{ color: tan; }<br />
p em{ font-variant: small-caps; }</code></p>
<p>You can <em>indent in chunks</em>. That is to say, sections that are related directly are indented (like the span and em as children of the p tag), but unrelated ones stay unindented (like the block id and p tag). This could work, as you keep your file size small, while still having the legibility and organization specific to the indented style. It&#8217;s a sort of hybrid option.</p>
<p><code>body{ margin:0; padding:0 }<br />
#wrap{ position: relative; margin: 0 auto; width: 900px; }<br />
#left{ float: left; width: 66%; }<br />
#left .inner{ padding: 20px; }</code></p>
<p><em>Fully indented</em> text has the best legibility and is, to many people, myself included, the easiest way to maintain your stylesheets. The downside is that styles get big pretty fast so it&#8217;s a good idea to combine this style of writing with multiple file stylesheets.</p>
<h4>Single line vs multiple lines</h4>
<p><code>#left{ float: left; width: 66%; }<br />
#right{ float: right;<br />
width: 33%;<br />
border: 1px solid #333;<br />
background: #cecece;<br />
font: normal normal 1.4em Arial, Verdana, Tahoma, sans-serif; }</code></p>
<blockquote class="inner"><p>I found that many of the programmers I&#8217;ve worked with prefer single line CSS. | I found that many fellow web designers prefer the multiple line approach.</p></blockquote>
<p>Single line CSS attributes are a very concise way of writing your styles, but they have the disadvantage of becoming harder to read as the attributes add up. The id left in the example above is an example of an easy to read and concise set of attributes, whereas the id right, with it&#8217;s many attributes is a huge pain to figure out, especially if you&#8217;re looking at the code a few months after it was written.<br />
<code>#left{<br />
float: left;<br />
width: 66%; }<br />
#right{<br />
float: right;<br />
width: 33%;<br />
border: 1px solid #333;<br />
background: #cecece;<br />
font: normal normal 1.4em Arial, Verdana, Tahoma, sans-serif; }</code></p>
<p>The multiple line approach has it&#8217;s appeals: it&#8217;s easy to read, to edit and, subsequently, easy to maintain. The downside, of course, is the increased length of your stylesheets.</p>
<h4>To alphabetize or not to ahlaiebtpze</h4>
<p><code>#right{<br />
background: #cecece; border: 1px solid #333;<br />
float: right;<br />
font: normal normal 1.4em Arial, Verdana, Tahoma, sans-serif;<br />
width: 33%; }</code></p>
<p>I am a huge supporter of CSS alphabetization, so I may come off a bit subjective here, but I really do think it&#8217;s one of the best ways to format your stylesheets, especially when using the single line approach. That way, you can overcome the downside of many attributes becoming hard to read through, like in the example above.</p>
<p><code>#right{<br />
float: right; background: #cecece; border: 1px solid #333; width: 33%; font: normal normal 1.4em Arial, Verdana, Tahoma, sans-serif; }</code></p>
<p>Alphabetizing takes time to get used to. It&#8217;s not the most intuitive and natural way of writing and it&#8217;s main downside is extra time spent on the CSS file. But, if you persist in this practice, you can develop your writing skills to such extent that it becomes natural to alphabetize.</p>
<h4>The curliest of brackets</h4>
<p><code>#left{<br />
float: left;<br />
width: 66%; }<br />
#left{<br />
float: left;<br />
width: 66%;<br />
}<br />
#left{<br />
float: left;<br />
width: 66%;<br />
}</code></p>
<p>Should the closed curly bracket at the end of each selector be next to the last property, or on the next line? And should it be indented or not? Personally, I put the bracket next to the last property, to save some space. But that&#8217;s just me, this one&#8217;s totally open to discussion.</p>
<h4>A few examples</h4>
<p><code><br />
body{margin:0;padding:0}<br />
#wrap{width:900px;position:absolute}<br />
#left{width:66%;float:left}<br />
#right{width:33%; float:right}<br />
.inner{padding:20px}</code></p>
<p>I like to call this the <em>programmer-friendly approach</em> (though I&#8217;m sure this doesn&#8217;t apply to all programmers). Single line, chunky indenting, no alphabetization, no extra spaces, curly brackets at the end of the line. And it looks really, really crammed.</p>
<p><code>body{<br />
margin             : 0;<br />
padding            : 0;<br />
}<br />
#wrap{<br />
position        : absolute;<br />
width           : 900px;<br />
}<br />
#left{<br />
float           : left;<br />
width           : 66%;<br />
}<br />
#right{<br />
float           : right;<br />
width           : 33%;<br />
}<br />
.inner{<br />
padding      : 20px;<br />
}</code></p>
<p>I call this one the <em>over-achiever approach</em>. Multiple lines, full indenting throughout, alphabetized, curly bracket on a new line and indented and bonus points for super indenting the properties to be one above the other. And it is way to spaced out.</p>
<p><em class="end">Whichever way you decide to approach your CSS stylesheet &#8220;writing skills&#8221;, be aware of the pitfalls of each one and settle on a way that fits your project&#8217;s needs, not your personal preference.<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/index.php/2010/html-css/the-definitive-guide-to-formatting-css/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Pure CSS Vignette</title>
		<link>http://sickdesigner.com/index.php/2010/html-css/css3-vignette-a-wicked-cool-technique/</link>
		<comments>http://sickdesigner.com/index.php/2010/html-css/css3-vignette-a-wicked-cool-technique/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 04:52:19 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[absolute]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[opacity]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[rgba]]></category>
		<category><![CDATA[technique]]></category>
		<category><![CDATA[transition]]></category>
		<category><![CDATA[vignette]]></category>
		<category><![CDATA[vignettes]]></category>
		<category><![CDATA[z-index]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=826</guid>
		<description><![CDATA[Our latest posts have mostly been about design, so today we&#8217;re going full on code monkey with a cool CSS3 technique: Vignettes! The technique involves a few divs, a bit of simple CSS, and a whole lot of fun. So click the pic and read on. Of course, there are those of you just looking [...]]]></description>
			<content:encoded><![CDATA[<p>Our latest posts have mostly been about design, so today we&#8217;re going full on code monkey with a cool CSS3 technique: Vignettes! The technique involves a few divs, a bit of simple CSS, and a whole lot of fun. So click the pic and read on.<span id="more-826"></span></p>
<p>Of course, there are those of you just looking for the quick fix so, without further ado, here&#8217;s the link to the demo page:</p>
<p><a class="demo" href="http://sickdesigner.com/demos/css-vignette/css-vignette.html" target="_blank">DEMO</a></p>
<h4>So, what&#8217;s this puppy about?</h4>
<p>For those of you who don&#8217;t know, a vignette effect is a discoloration on the edges of an image. This effect usually appears in photography and it can be either accidental or intentional. It can also be either light or dark, depending on the situation. Like this:</p>
<p><img class="alignnone size-full wp-image-839" title="Vignette Example - Courtesy of Teodora Miclaus" src="http://sickdesigner.com/wp-content/uploads/2010/04/vignette-example.jpg" alt="" width="680" height="326" /></p>
<p>Good, now that that&#8217;s out of the way, let&#8217;s continue to the actual  tutorial.</p>
<p><img class="alignnone size-full wp-image-858" title="css3-vignette-battle-plan" src="http://sickdesigner.com/wp-content/uploads/2010/04/css3-vignette-battle-plan.jpg" alt="" width="680" height="380" /></p>
<p>We&#8217;ll be dividing the vignette into four div elements as shown in the diagram above.</p>
<p>Using absolute positioning we&#8217;ll be telling the four divs to sit in their respective corners and using a combination of CSS Gradients and RGBA we&#8217;ll fade the discoloration towards the center.</p>
<blockquote class="inner"><p>One should be careful not to overdo it with the vignette. A black vignette on a white background will look really cheap, mostly due to universal browser dithering problems, so a subtle approach is key to a successful effect.</p></blockquote>
<p>We&#8217;ll also set the height/width of the divs using percentages. This way we&#8217;ll get a proportional vignette according to the user&#8217;s screen size. The trick with this technique is using just the right amount of height/width. Too much, and the content will become unselectable on account of the divs having a high z-index value. Too little and the effect is barely noticeable. I did a few experiments and the widest range of usable heights/widths is somewhere around 12%-17%. In this tutorial I used 15% which seems to work fine for resolutions from 1024&#215;768 up to 1920&#215;1080.</p>
<h4>The HTML</h4>
<p>The HTML part is really, really straight forward &#8211; just four empty divs, in no particular order:</p>
<p><code>&lt;div id="top"&gt;&lt;/div&gt;<br />
&lt;div id="right"&gt;&lt;/div&gt;<br />
&lt;div id="bottom"&gt;&lt;/div&gt;<br />
&lt;div id="left"&gt;&lt;/div&gt;</code></p>
<h4>The CSS</h4>
<p>Here where the magic really happens:</p>
<p><code> /* First we set the four elements of our vignette<br />
to be on top no matter what and set their initial<br />
width and height which we'll overwrite in the next declarations.<br />
*/<br />
#top, #bottom, #left, #right{<br />
height: 100%;<br />
position: absolute;<br />
z-index: 999;<br />
width: 100%; }<br />
</code><br />
<code><br />
/* Overwriting the default 100% */<br />
#top, #bottom{<br />
height: 15%; }<br />
</code><br />
<code><br />
#left, #right{<br />
width: 15%; }<br />
</code><br />
<code><br />
/* We set the gradient with CSS3 from a solid gray to<br />
a 100% transparent color which should be the same as<br />
the body background color, to have a nice, clean falloff.<br />
And we're also setting the position of the vignette elements.<br />
*/<br />
#top{<br />
background-image: -moz-linear-gradient(100% 100% 90deg, rgba(255, 255, 255, 0), #e1e1e1 );<br />
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e1e1e1), to(rgba(255, 255, 255, 0)));<br />
top: 0; }<br />
</code><br />
<code><br />
#bottom{<br />
background-image: -moz-linear-gradient(100% 100% 90deg, #e1e1e1, rgba(255, 255, 255, 0) );<br />
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0)), to(#e1e1e1));<br />
bottom: 0; }<br />
</code><br />
<code><br />
#left{<br />
background-image: -moz-linear-gradient(100% 100% 180deg, rgba(255, 255, 255, 0), #e1e1e1 );<br />
background-image: -webkit-gradient(linear, left center, right center, from(#e1e1e1), to(rgba(255, 255, 255, 0)));<br />
left: 0; }<br />
</code><br />
<code><br />
#right{<br />
background-image: -moz-linear-gradient(100% 100% 180deg, #e1e1e1, rgba(255, 255, 255, 0) );<br />
background-image: -webkit-gradient(linear, right center, left center, from(#e1e1e1), to(rgba(255, 255, 255, 0)));<br />
right: 0; }</code></p>
<p>The code may look a bit stuffy at first but it&#8217;s quite easy to maintain as only the hex values of the gradient and perhaps the height/width values need adjustment.</p>
<h4>Browser compatibility</h4>
<p><img class="alignnone size-full wp-image-835" title="CSS3 Vignette Browser Compatibility Chart" src="http://sickdesigner.com/wp-content/uploads/2010/04/browsers.jpg" alt="" width="680" height="380" /></p>
<p>All in all I&#8217;d say it&#8217;s a pretty useful and usable technique, but if you must extend it&#8217;s compatibility to Opera and IE7 and above you could use fixed heights/widths and a repeating transparent PNG image. A lot less cool, but you get the point.</p>
<p><em class="end">I hope you enjoyed this little technique and if you ever get the chance to use it somewhere, I&#8217;d appreciate dropping a line and showing off.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/index.php/2010/html-css/css3-vignette-a-wicked-cool-technique/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Taking semantic tags one step further</title>
		<link>http://sickdesigner.com/index.php/2010/html-css/truly-semantic-tags-and-html5/</link>
		<comments>http://sickdesigner.com/index.php/2010/html-css/truly-semantic-tags-and-html5/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 13:52:37 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[semantic]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=504</guid>
		<description><![CDATA[Lately it seems that the interwebs have been going all out nuts with HTML5 and CSS3. Everybody&#8217;s a pioneer and everybody&#8217;s declaring NOW is the time to start using them. But has anyone actually done more than just dip in? I&#8217;m not trying to point fingers here, but one must admit that while there is [...]]]></description>
			<content:encoded><![CDATA[<p>Lately it seems that the interwebs have been going all out nuts with <a href="http://dev.w3.org/html5/spec/Overview.html">HTML5</a> and <a href="http://www.css3.info/">CSS3</a>. Everybody&#8217;s a pioneer and everybody&#8217;s declaring NOW is the time to start using them. But has anyone actually done more than just dip in? <span id="more-504"></span></p>
<p>I&#8217;m not trying to point fingers here, but one must admit that while there is a growing interest and awareness of HTML5 and CSS3, most agencies and freelancers are just as discrete about them as before.</p>
<p>On the other hand, agencies and freelancers haven&#8217;t really been pioneers for obvious reasons: they work for clients. And clients don&#8217;t care about the latest and greatest, they care about revenue and WYSIWYG (most have never heard of graceful degradation/progressive enhancement). It&#8217;s all about the Benjamins, baby!</p>
<p>Enter the wonderful world of personal pages. I&#8217;m referring to design blogs and designer portfolios mostly. These places have, for some very long time now, been a sandbox for testing, learning and experimenting with technology that&#8217;s considered &#8220;avantgarde&#8221;. Though, one must point out the existence of the <a href="http://html5gallery.com/">HTML5 Gallery</a> Showcase, a place to check out plenty of websites using HTML5.</p>
<blockquote class="inner"><p>So, in our sickness, we thought: lLet&#8217;s do the redesign for Sickdesigner using HTML5 and CSS3. We did, and so much more.</p></blockquote>
<p>It was a stroke of luck that around that time we came across a mind-blowing post by the one and only <a href="http://ejohn.org/blog/html5-shiv/">John Resig</a>, creator of <a href="http://jquery.com/">jQuery</a>. In case you haven&#8217;t come across the article or just didn&#8217;t click the link back there, it&#8217;s all about a nifty little piece of Javascript goodness called <em>document.createElement</em> which John used to portray how one could create and use the new tags in HTML5.</p>
<p>This tiny piece of code made all the difference in our minds, when realizing the potential and usefulness of <em>document.createElement</em>. Here&#8217;s a bit of code from this very website:<br />
<code>&lt;container&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;header&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a class="tooltip" id="logo" href="<a href="view-source:http://sickdesigner.com/">http://sickdesigner.com/</a>" title="The main ward"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sickdesigner - The sickness is spreading<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/a&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/h1&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;/header&gt;<br />
&lt;/container&gt;</code></p>
<p>At this point you&#8217;re probably scratching your head a bit. It&#8217;s okay, it&#8217;s normal. Most of you will recognize the h1 and a tags. Some of you, more familiar with HTML5, will recognize the header tag. But then, right at the very start we have  a tag called container, which doesn&#8217;t really belong anywhere.  That&#8217;s because it&#8217;s generated with <em>document.createElement</em>.</p>
<p>Well, there&#8217;s a very good explanation for this: Semantic tags. We&#8217;ve all heard of them and, unless you have tables for layouts, you&#8217;re using them.</p>
<blockquote class="inner"><p>Semantic tags = &#8220;use the right tag for the right place&#8221;. If you&#8217;ve got a paragraph, use a p tag, if you&#8217;ve got a line break, use an hr tag. This also extends to classes and ids: if you&#8217;ve got a header div, slap on an id of &#8220;header&#8221;.</p></blockquote>
<p>We work in an environment which really thrives on progress. And in such an environment it is the opinion of this sick designer that one must always strive to challenge old paradigms. We challenge the term Semantic tag. We want it to actually mean a semantic tag, a tag that means something, that expresses it&#8217;s use.</p>
<h4>Still not on our side? Check this out:</h4>
<p><code>&lt;container&gt;&lt;/container&gt;<br />
&lt;div id="container"&gt;&lt;/div&gt;</code></p>
<p>Isn&#8217;t the first way of writing the container cleaner, more efficient, more meaningful and easier to maintain?</p>
<blockquote class="inner"><p>So what other tags did we decide to include? Let&#8217;s see now: wrap, container, header, sidebar, twitter, rss, homepage, posts, article, category, tags, footer, single, comments, author.</p></blockquote>
<p>HTML is a great language which does employ semantic tags in the sense described above, such as p, em, strong etc. But you&#8217;ll notice that they are all tags that relate strictly to content, not structure. For that we&#8217;re bestowed upon with divs. Ugly, ugly divs, which mean nothing but &#8220;a divider&#8221;. Sure, the W3C is trying their best to come up with semantic structural tags in HTML5, like header and nav and footer, and that&#8217;s peachy fine. But what they don&#8217;t understand is that not all websites are built the same. Not all websites have just these elements.</p>
<h4>Pop quiz, kids:</h4>
<p>Most blogs display their categories. What&#8217;s the appropriate tag for a category? And I mean truly appropriate, not a span. Why not have a <em>category</em> tag?</p>
<p>We&#8217;ve only used the newly created tags for structural purposes. It&#8217;s not an exercise in &#8220;look ma, see what I did?&#8221;, but an attempt to bring sense and direction to a part of HTML that lacks proper meaning.</p>
<h4>The how to part</h4>
<p>Now, enough chatting about this stuff. Let&#8217;s say you want to implement this kind of weirdness in your next project. How do you go about it?</p>
<p>First, take a piece of paper and write down all of the tags you&#8217;re going to create. This is not rocket surgery(!), but planning ahead is essential.</p>
<h4>The Javascript</h4>
<p><code>// Create elements<br />
document.createElement("wrap");<br />
document.createElement("container");<br />
document.createElement("header");<br />
document.createElement("sidebar");<br />
document.createElement("footer");</code></p>
<p>Quite. Save that with a filename of, say, <em>create-elements.js</em>. Let&#8217;s include that in our HTML page.</p>
<h4>The HTML</h4>
<p><code>&lt;!DOCTYPE html&gt;<br />
&lt;html&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;head&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Truly Semantic Tags&lt;/title&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link rel="stylesheet" href="style.css" type="text/css" media="screen" /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script type="text/javascript" src="create-elements.js"&gt;&lt;/script&gt;<br />
&lt;/head&gt;</code></p>
<p>I&#8217;ve also added the <a href="http://www.w3schools.com/html5/tag_doctype.asp">HTML5 Doctype</a> declaration and a stylesheet to the equation. Now, let&#8217;s move on to the CSS part of the deal.</p>
<h4>And the CSS</h4>
<p><code>wrap, container, header, sidebar, footer{<br />
&nbsp;&nbsp;&nbsp;display: block; }</code><br />
By default, these elements have no properties and since their use is structural, a <em>display: block</em> is needed for proper rendering.</p>
<p>And there you have it. Now you&#8217;re ready to style away at these newly created elements, without added classes/ids and with meaningful names.</p>
<h4>But, alas</h4>
<p>Of course, we can&#8217;t forget about that wretched &#8220;old friend&#8221; of ours, Internet Explorer.</p>
<p>If you&#8217;re thinking about whether this stuff works on IE6&#8230;forget about it. It just withers into a corner and starts crying at the very site of the new tags. And it should. I don&#8217;t hear any cries of grief over the inability of Firefox 1.5 to render border-radius, so there will be no tears shed for this relic.</p>
<p>IE7 and 8, however, do seem to comply. There are restrictions, though. It seems that IE likes to create self closing tags, instead of normal ones. But there is hope, yet.</p>
<p>You can use <a href="http://remysharp.com/2009/01/07/html5-enabling-script/">Remy Sharp&#8217;s</a> <a href="http://html5shiv.googlecode.com/svn/trunk/html5.js">HTML5 shiv</a>. It&#8217;s a nice little piece of Javascript, which essentially does exactly what we just did, but using the <em>.replace</em> method and some nice regular expressions. Just download and add your own  elements to the list. Like so:</p>
<p><code>// For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/ (credit to @jdalton for minif)<br />
/*@cc_on'abbr article aside audio canvas container details figcaption figure footer header hgroup mark menu meter nav output progress section sidebar summary time video wrap'.replace(/\w+/g,function(n){document.createElement(n)})@*/</code></p>
<p>This way you can include IE7 and 8 into your supported browsers list.</p>
<p>So, can you use this in a client&#8217;s project? Perhaps. We think it&#8217;s feasible enough, although it does take some (little) time getting used to it. And if your next project doesn&#8217;t imply supporting IE (one can only dream, right?), then this is definitely something you should try.</p>
<p><em class="end">This whole idea may seem a bit nutty and perhaps it is. But I like to look at us web folk like doctors. We work in an ever changing, nerve wracking medium and all our professional lives we strive to learn newer, better ways of doing what we do, no matter how ludicrous and unreasonable they may seem ar first glance.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/index.php/2010/html-css/truly-semantic-tags-and-html5/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

