<?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>Programming Blog &#187; style sheet</title>
	<atom:link href="http://www.neurosoftware.ro/programming-blog/tag/style-sheet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.neurosoftware.ro/programming-blog</link>
	<description>Web development , php , ajax , symfony, framework, zend</description>
	<lastBuildDate>Thu, 18 Aug 2011 08:11:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The Pros And Cons Of CSS Resets</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/the-pros-and-cons-of-css-resets/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/the-pros-and-cons-of-css-resets/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 19:46:45 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[blockquote]]></category>
		<category><![CDATA[browser defaults]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[default values]]></category>
		<category><![CDATA[easy solution]]></category>
		<category><![CDATA[h1]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[pros and cons]]></category>
		<category><![CDATA[style sheet]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/the-pros-and-cons-of-css-resets/</guid>
		<description><![CDATA[A recent comment by Chris on my post about css vs tables, reminded me that developing cross-browser css still gives people trouble. Fortunately there&#8217;s an easy solution, which is to use a css reset file. However css resets have some cons along with the pros. Here&#8217;s Chris&#8217; comment: One issue is that different browsers have [...]]]></description>
			<content:encoded><![CDATA[<p>A recent comment by Chris on my post about <a href="http://www.vanseodesign.com/css/css-divs-vs-tables/">css vs tables</a>, reminded me that developing cross-browser css still gives people trouble. Fortunately there&#8217;s an easy solution, which is to use a css reset file. However css resets have some cons along with the pros.<br />
<span></span><br />
<a href="http://shestoleherownfuture.deviantart.com/art/Reset-153481270"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/41786_reset-2.jpg" alt="Computer reset" width="465" height="310" /></a></p>
<p>Here&#8217;s Chris&#8217; comment:</p>
<blockquote><p>
One issue is that different browsers have different definitions of the padding and the margin variables. The fact that different browsers and different versions of browsers look at these and other variables differently is a really pain.
</p>
</blockquote>
<p>All true except for that last part about it being a pain to <a href="http://www.vanseodesign.com/css/cross-browser-css/">develop cross-browser css</a>.</p>
<p>I want to talk about the problem of different presentational defaults used by browsers, and then talk about how  css resets solve the problem and why you may not want to use a css reset.</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/02/browser-logos-30.jpg" alt="Variety browser logos" width="465" height="475" /></p>
<h2>The Problem of Browser Defaults</h2>
<p>When you add an &lt;h1&gt; to a web page, but don&#8217;t specifically style it in any way, that &lt;h1&gt; will by default have some styles associated with it.</p>
<p>It will likely be larger than other text on the page, it will be bold, and it will have a certain amount of space above and below.</p>
<p>This is a good thing and one of the reasons html is relatively easy to use. An &lt;h1&gt; should look different from an &lt;h2&gt;, which should look different from a &lt;blockquote&gt;, etc. By default all these things will look different.</p>
<p>The problem is there <a href="http://meyerweb.com/eric/thoughts/2007/04/18/reset-reasoning/">isn&#8217;t a standard for what those defaults should be</a>. While browsers with the same rendering engine will use the same defaults, two different rendering engines could have different default values.</p>
<p>The table below shows defaults for an &lt;h1&gt; tag in several browsers.</p>
<p>The values are from a more complete table of <a href="http://lists.w3.org/Archives/Public/www-style/2008Jul/att-0124/defaultstyles.htm">CSS2.1 User Agent Style Sheet Defaults</a>. The date listed in the url shows the full table is nearly 2 years old, but there&#8217;s no reason to think the default values have changed.</p>
<p>Here&#8217;s a more recent table of <a href="http://www.iecss.com/">defaults for IE6&ndash;IE9</a></p>
<table>
<tr>
<th>Browser</th>
<th>font-size</th>
<th>margin</th>
</tr>
<tr>
<td><a href="http://www.w3.org/TR/CSS2/sample.html">W3C Recommended</a></td>
<td>2em</td>
<td>0.67em 0</td>
</tr>
<tr>
<td>IE7</td>
<td>24pt</td>
<td>14.25pt 0</td>
</tr>
<tr>
<td>IE8</td>
<td>2em</td>
<td>0.67em 0</td>
</tr>
<tr>
<td>FF2</td>
<td>32px</td>
<td>21.4667px 0</td>
</tr>
<tr>
<td>FF3</td>
<td>32px</td>
<td>21.4333px 0</td>
</tr>
<tr>
<td>Opera</td>
<td>32px</td>
<td>21px 0</td>
</tr>
<tr>
<td>Safari</td>
<td>32px</td>
<td>21px 0</td>
</tr>
</table>
<p>Browsers <a href="http://www.vanseodesign.com/css/thoughts-on-building-a-typographic-stylesheet/">typically use 16px as the default font-size</a> for body text so 2em = 32px = 12pt, but it&#8217;s easy to realize how different these values will be if you change the font-size on the body or start setting the size for the &lt;h1&gt; tag.</p>
<p>Another common example of different browser defaults are lists. By default lists are usually indented, however one browser will do that by giving the list some margin and another does it by giving the list some padding.</p>
<p>When you come along and change one or the other things are no longer equivalent across browsers.</p>
<p>There are many other inconsistencies and if you aren&#8217;t aware of each it can be confusing to try to make your design work cross browser.</p>
<p><a href="http://koichigotiko.deviantart.com/art/Math-Homework-150108584"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c6317_math-2.jpg" alt="Math homework" width="465" height="349" /></a></p>
<h2>The Simple Solution</h2>
<p>The solution to the problem above is actually quite simple. Since it&#8217;s the browser defaults causing the problem, don&#8217;t let the browser default be the style that&#8217;s applied.</p>
<p>If you explicitly set a margin-bottom of 20px on &lt;h1&gt; tags then all browsers will use that 20px. It&#8217;s only when you don&#8217;t explicitly set the style that the default will be used.</p>
<p>For example when I&#8217;m using an unordered list on a site, I&#8217;ll add the following to the css</p>
<pre>
ul {margin: 0; padding: 0}
</pre>
<p>The line above will ensure that all browsers are now using the same margin and padding on ordered lists. The inconsistency is gone. Of course since I probably do want some indentation, I might change the above to something like</p>
<pre>
ul {margin: 20px; padding: 0}
</pre>
<p>Now the list will be indented 20px as well as having 20px of space on the top, bottom, and right. More importantly all browsers will add those 20px as margin. You can just as easily place the 20px on the padding and leave the margin as 0 if you want. The important thing is to set both.</p>
<p><a href="http://tolgasipahi.deviantart.com/art/reset-175674510"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/98b81_reset.jpg" alt="Reset button" width="465" height="310" /></a></p>
<h2>CSS Resets: Pros and Cons</h2>
<p>As I mentioned above there are a lot of inconsistencies in browser defaults and you probably aren&#8217;t going to remember them all, let alone remember to explicitly set values for all of them. This is where css resets come in.</p>
<h3>Pros</h3>
<p><a href="http://sixrevisions.com/css/css-tips/css-tip-1-resetting-your-styles-with-css-reset/">CSS resets</a> set new and consistent default values for you. If we look at <a href="http://meyerweb.com/eric/tools/css/reset/index.html">Eric Meyer&#8217;s css reset file</a> (probably the most used of all css resets) it starts by listing a number of html elements and applying the following css to all of them.</p>
<pre>
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
</pre>
<p>There&#8217;s more to the file, but the idea is still to solve the problem of different browser defaults. If you use the css reset you can be sure that all the tags listed will have a margin of 0px, a padding of 0px, etc. The inconsistency has been removed.</p>
<p>The other popular css reset is the <a href="http://developer.yahoo.com/yui/3/cssreset/">one provided by Yahoo</a> and you can read a few <a href="http://www.kennycarlile.com/2008/06/19/yahoo-vs-eric-meyer-css-reset/">thoughts about both here</a>.</p>
<p>Sounds like a perfect and easy solution so where&#8217;s the downside?</p>
<h3>Cons</h3>
<p>The downside is that while the reset fixes the inconsistency problem, it does so by creating <a href="http://snook.ca/archives/html_and_css/no_css_reset/">new defaults that you may or may not want</a>. The new defaults will be consistent cross browser, but you&#8217;ll likely still end up wanting to style many of them.</p>
<p>Keeping with the example of lists, most people usually do want their lists to be indented. Odds are even with a reset in place you&#8217;ll still add those same 20px (or any value of your choosing) to the margin or padding.</p>
<p>You now have a bit of <a href="http://www.vanseodesign.com/web-design/redundancy/">redundant code</a> as you&#8217;re specifying the margin or padding style twice. Is that big deal? Not really. It&#8217;s a few extra characters in a css file, but it is a few extra characters that don&#8217;t need to be there for every element you later style. Those characters do add up.</p>
<p>Meyer himself says as much when he tells us</p>
<blockquote><p>In other words, this is a starting point, not a self-contained black box of no-touchiness.</p>
</blockquote>
<p>Most people, however, tend to treat resets as a black box.</p>
<p>Another potential issue is the tags you don&#8217;t style. For example one of the tags set to have 0 margin and padding is the &lt;abbr&gt; tag.</p>
<p>I don&#8217;t know about you, but I can&#8217;t remember the last time I used the &lt;abbr&gt; tag. Because I don&#8217;t use the tag regularly, I generally don&#8217;t style it.</p>
<p>Imagine though at a later time I or a client decides to use the tag. With the reset there will be no margin or padding on the abbreviation, which is probably not what you want. In this case letting the browser set the default might be the better option.</p>
<p>This isn&#8217;t exactly a difficult problem to overcome. You just have to make sure every element listed in the reset is styled the way you want, whether it&#8217;s your own style, the reset style, or the browser default style.</p>
<p>Like Eric Meyer says a css reset is a starting point and not a black box.</p>
<p><a href="http://panic.com/coda/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/98b81_css-coda-3.jpg" alt="Coda's css editor" width="465" height="219" /></a></p>
<h2>Should You Use a CSS Reset?</h2>
<p>Using a css reset is really up to you. They will fix the problem of browser defaults. They also create a few minor issues of their own, that quite honestly either aren&#8217;t a big deal or may never even come up.</p>
<p>I usually don&#8217;t add one (though I do use one at times), mainly because I am already styling those elements where there&#8217;s probably going to be a <a href="http://www.vanseodesign.com/css/cross-browser-css/">cross-browser</a> default conflict. After coding for a number of years I&#8217;ve developed my own way of structuring a site and know where the potential issues are.</p>
<p>With tags I don&#8217;t commonly use or style, I&#8217;d rather let the browser default take over, since it generally won&#8217;t break the design and there isn&#8217;t any reason everything needs to look exactly the same across all browsers.</p>
<p>I take care of the elements I know can cause major issues and tend not to worry about those with minor differences.</p>
<p>That&#8217;s not to say I&#8217;ll never use a reset or that you shouldn&#8217;t use one either. As long as you understand what they&#8217;re doing they&#8217;re great files. Just treat them as a starting point and don&#8217;t simply add one and forget about it.</p>
<p>Ideally you would use one or two css resets as a guide to build your own reset file that you can use in your projects based on your style of coding and design.</p>
<p><a href="http://m0m0-san.deviantart.com/art/RESET-161632347"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e0109_reset-3.jpg" alt="Illustration of child sitting at a school desk with the word reset" width="465" height="602" /></a></p>
<h2>Summary</h2>
<p>Cross-browser inconsistencies often trip up <a href="http://www.vanseodesign.com/css/my-development-with-css/">new css developers</a>. The fix is really quite simple in that you just need to set explicit styles as opposed to relying on browser defaults. For many of us that will only mean adding the styles to a few key elements, though it depends on how you typically structure a site&#8217;s html.</p>
<p>CSS resets solve the problem quickly and easily by declaring all those styles for you including a variety of elements you may not remember to include on your own.</p>
<p>If you&#8217;re new to css or find you have trouble developing a design that looks the same across browsers you probably want to use one.</p>
<p>On the other hand if you&#8217;re an experienced developer who doesn&#8217;t have cross-browser issues you may not need to add a reset (unless a reset is the reason for your cross-browser consistency) or you should remember not to treat your reset as a black box.</p>
<p>The choice is really yours. I do think css resets are a good thing as long as you understand what it is they&#8217;re doing and where the few potential problems with them are.</p>
<p>Out of curiosity do you use a css reset? If so which one and do you just include it or do you use it at as a starting point?</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e9d4b_?ak_action=api_record_view&amp;id=2665&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/RX7lg1jfwZl1fw7MjbwE-XiZOuo/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/3af43_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/RX7lg1jfwZl1fw7MjbwE-XiZOuo/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ca8bb_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/776c4_o0R8yyZ1xio" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/the-pros-and-cons-of-css-resets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Comprehensive Guide to CSS Resets</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/a-comprehensive-guide-to-css-resets/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/a-comprehensive-guide-to-css-resets/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 11:45:24 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[web resources]]></category>
		<category><![CDATA[comprehensive guide]]></category>
		<category><![CDATA[creative commons license]]></category>
		<category><![CDATA[ill effects]]></category>
		<category><![CDATA[jumping off point]]></category>
		<category><![CDATA[original version]]></category>
		<category><![CDATA[style rule]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[web designer]]></category>
		<category><![CDATA[web developers]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/a-comprehensive-guide-to-css-resets/</guid>
		<description><![CDATA[This guide examines the infinite-like variety of CSS resets created by web developers and designers across the world. While almost all of these CSS resets are generally provided free for public use (many through Creative Commons licensing), it is incumbent upon you to check the terms of use before putting them to use in your [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sixrevisions.com/css/a-comprehensive-guide-to-css-resets/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/65cdb_06-01_css_reset_guide_ld_img.png" width="550" height="200" /></a></p>
<p>This guide examines the infinite-like variety of CSS resets created by web developers and designers across the world.</p>
<p>While almost all of these CSS resets are generally provided free for public use (many through Creative Commons licensing), it is incumbent upon you to check the terms of use before putting them to use in your projects.</p>
<p>This guide follows <a href="http://sixrevisions.com/css/the-history-of-css-resets/">Part 1</a>, where the <a href="http://sixrevisions.com/css/the-history-of-css-resets/">history of CSS resets</a> was discussed; you&#8217;re advised to read that before this one to get the most out of this guide.</p>
<p><span></span></p>
<p>This is a three-part series of articles on the topic of CSS resets.</p>
<ul>
<li><a href="http://sixrevisions.com/css/the-history-of-css-resets/">Part 1: The History of CSS Reset</a></li>
<li>Part 2: A Comprehensive Guide to CSS Resets</li>
<li>Part 3: Should You Use CSS Reset? (coming soon)</li>
</ul>
<p>In putting together this guide, the <a href="http://perishablepress.com/press/2007/10/23/a-killer-collection-of-global-css-reset-styles/">2007 collection of resets</a> by Jeff Starr &#8212; who, as an aside, has contributed articles on Six Revisions &#8212; was used as a jumping-off point.</p>
<h3>&quot;Hard&quot; Reset</h3>
<p>As discussed in <a href="http://sixrevisions.com/css/the-history-of-css-resets/">Part 1</a> of this series, the original version of the &quot;hard&quot; reset was by web designer Andrew Krespanis:</p>
<pre>
* {padding:0; margin:0;}
</pre>
<p>It wasn&#8217;t long before folks added <code>border: 0; and outline: 0;</code> to the list of properties, giving us:</p>
<pre>* {padding:0; margin:0; border: 0; outline: 0;}</pre>
<p>Because of the universal selector (<code>*</code>), this succinct style rule has a powerful transformative effect on any web page in which it is used.</p>
<p>Unfortunately, because of the well-documented ill effects of such an all-encompassing selector, many designers have moved away from this method towards something more controlled.</p>
<h3>Tantek Çelik&#8217;s undohtml.css (2010 Version)</h3>
<p>Tantek Çelik, who is thought to have kick-started the use of CSS resets back in 2004, updated his reset this year. What follows is the updated version of <em>undohtml.css</em>:</p>
<pre>
<strong>/* undohtml.css */
/* (c) 2004-2010 Tantek Çelik. Some Rights Reserved. http://tantek.com */
/* This style sheet is licensed under a Creative Commons License.      */
/*             http://creativecommons.org/licenses/by/2.0              */

/* Purpose: undo some of the default styling of common browsers        */

/* link underlines tend to make hypertext less readable,
   because underlines obscure the shapes of the lower halves of words */</strong>
:link,:visited,ins { text-decoration:none }

<strong>/* no list-markers for nav lists, default markers work well for item lists */</strong>
nav ul,nav ol { list-style:none }

<strong>/* avoid browser default inconsistent heading font-sizes */
/* and pre/code/kbd too */</strong>
h1,h2,h3,h4,h5,h6,pre,code,kbd { font-size:1em; }

<strong>/* remove the inconsistent (among browsers) default ul,ol padding or margin  */
/* the default spacing on headings does not match nor align with
   normal interline spacing at all, so let's get rid of it. */
/* zero out the spacing around pre, form, body, html, p, blockquote as well */
/* form elements are oddly inconsistent, and not quite CSS emulatable. */
/*  nonetheless strip their margin and padding as well */</strong>
dl,ul,ol,li,
h1,h2,h3,h4,h5,h6,
html,body,pre,p,blockquote,
form,fieldset,input,label
{ margin:0; padding:0 }

<strong>/* who thought blue linked image borders were a good idea? no abbr borders */</strong>
abbr, img, object,
a img,:link img,:visited img,
a object,:link object,:visited object
{ border:0 }

<strong>/* de-italicize address,abbr */</strong>
address,abbr { font-style:normal }

<strong>/* get rid of ad frames inserted by local wifi connections e.g. AnchorFree */</strong>
iframe:not(.auto-link) { display:none ! important; visibility:hidden ! important; margin-left: -10000px ! important  }

<strong>/* more varnish stripping as necessary... */</strong>
</pre>
<p>The comments in the stylesheet explain the idea behind the update, but to reiterate, here is a breakdown of what the updated file does:</p>
<ul>
<li>Removes underlines (<code>text-decoration: none</code>) from links</li>
<li>Removes style properties from ordered/unordered lists</li>
<li>Resizes heading elements (<code>&lt;h1&gt;</code> through <code>&lt;h6&gt;</code>) as well as the <code>pre</code>, <code>code</code>, and <code>kbd</code> elements</li>
<li>Removes the margins and paddings from most HTML elements</li>
<li>Removes the border around linked images (i.e. <code>&lt;a&gt;&lt;img /&gt;&lt;/a&gt;</code>)</li>
<li>Removes italicization of <code>address</code> and <code>abbr</code> elements</li>
<li>Renders <code>iframes</code> invisible, mostly to stop &quot;ad frames inserted by local wifi connections&quot; from appearing</li>
</ul>
<h3>Poor Man&#8217;s Reset</h3>
<p>The &quot;poor man&#8217;s reset&quot; sets the <code>margin</code>, <code>padding</code>, <code>font-size</code>, and <code>borders</code> of the <code>html</code> and <code>body</code> elements instead of all elements. This not only removes the reliance on the universal selector, but is also more conservative with what elements and CSS properties are reset.</p>
<pre>html, body {padding: 0; margin: 0;}
html {font-size: 1em;}
body {font-size: 100%;}
a img, :link img, :visited img {border: 0;}</pre>
<h3>Siolon Reset</h3>
<p>In 2008, <a href="http://www.siolon.com/about/" title="About - siolon.com">Chris Poteet</a> developed a hybrid reset, incorporating the universal selector reset for a number of CSS properties, along with some selected (and idiosyncratic) reset values for individual elements such as <code>table</code> and <code>li</code>:</p>
<pre>
* {vertical-align: baseline; font-family: inherit; font-style: inherit; font-size: 100%; border: none; padding: 0; margin: 0;}
body {padding: 5px;}
h1, h2, h3, h4, h5, h6, p, pre, blockquote, form, ul, ol, dl {margin: 20px 0;}
li, dd, blockquote {margin-left: 40px;}
table {border-collapse: collapse; border-spacing: 0;}</pre>
<p>Poteet says the &quot;idea is that you intercept the default browser stylesheet (that is used first in the cascade), reset, and then apply generic styles including margin/padding.&quot;</p>
<h3>Inman Reset</h3>
<p>Designer/developer <a href="http://www.shauninman.com/pilation/">Shaun Inman</a> used the following <a href="http://si10.shauninman.com/">targeted global reset</a> on his personal site:</p>
<pre>
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, table, th, td, embed, object {padding: 0; margin: 0;}
table {border-collapse: collapse; border-spacing: 0;}
fieldset, img, abbr {border: 0;}
address, caption, cite, code, dfn, em, h1, h2, h3, h4, h5, h6, strong, th, var {font-weight: normal; font-style: normal;}
ul {list-style: none;}
caption, th {text-align: left;}
h1, h2, h3, h4, h5, h6 {font-size: 1.0em;}
q:before, q:after {content: '';}
a, ins {text-decoration: none;}</pre>
<p>The Inman Reset is reminiscent of a terser version of <a href="http://meyerweb.com/eric/thoughts/2008/01/15/resetting-again/">Eric Meyer&#8217;s Reset CSS</a>.</p>
<h3>Tripoli Reset</h3>
<p>One of the most far-reaching resets outside of Eric Meyer&#8217;s Reset CSS is the <a href="http://monc.se/kitchen/124/introducing-tripoli">Tripoli Reset</a> by David Hellsing. It is intended to work along with a <a href="http://monc.se/tripoli/css/generic.css">foundational stylesheet</a> to rebuild the CSS after the reset tears it down.</p>
<pre>
* {margin: 0; padding: 0; text-decoration: none; font-size: 1em; outline: none;}
code, kbd, samp, pre, tt, var, textarea, input, select, isindex, listing, xmp, plaintext {font: inherit; font-size: 1em; white-space: normal;}
dfn, i, cite, var, address, em {font-style: normal;}
th, b, strong, h1, h2, h3, h4, h5, h6 {font-weight: normal;}
a, img, a img, iframe, form, fieldset, abbr, acronym, object, applet, table {border: none;}
table {border-collapse: collapse; border-spacing: 0;}
caption, th, td, center {text-align: left; vertical-align: top;}
body {line-height: 1; background: white; color: black;}
q {quotes: "" "";}
ul, ol, dir, menu {list-style: none;}
sub, sup {vertical-align: baseline;}
a {color: inherit;}
hr {display: none;} <strong>/* we don't need a visual hr in layout */</strong>
font {color: inherit !important; font: inherit !important; color: inherit !important;} <strong>/* disables some nasty font attributes in standard browsers */</strong>
marquee {overflow: inherit !important; -moz-binding: none;}
blink {text-decoration: none;}
nobr {white-space: normal;}</pre>
<p>Hellsing&#8217;s reset addresses many deprecated HTML elements &#8212; often by disabling them &#8212; such as the <code>&lt;blink&gt;</code> and <code>&lt;marquee&gt;</code> elements, which could be handy for projects that are used by several people with varying levels of HTML knowledge. Some developers love the Tripoli Reset, others consider it major overkill.</p>
<h3>Dan Schulz&#8217;s Reset</h3>
<p>In August 2008, Dan Schulz, a vastly talented web designer who has since passed away, posted his idiosyncratic version of a <a href="http://www.sitepoint.com/forums/showpost.php?p=3935978&amp;postcount=47">&quot;global&quot; reset</a> (which he extensively documented in the SitePoint thread he posted it in):</p>
<pre>
<strong>/* CSS RESET RULES */</strong>
html, body, a, abbr, acronym, address, area, b, bdo, big, blockquote, button, caption, cite, code,
col, colgroup, dd, del, dfn, div, dl, dt, em, fieldset, form, h1, h2, h3, h4, h5, h6, hr, i, img,
ins, kbd, label, legend, li, map, object, ol, p, param, pre, q, samp, small, span, strong, sub,
sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, ul, var {
    margin: 0;
    padding: 0;
    vertical-align: baseline;
}

body {
    background: #FFF;
    color: #000;
    font: 85%/1.5 verdana, arial, helvetica, sans-serif;
}

code, pre {
    white-space: pre;
}

del {
    text-decoration: line-through;            <strong>/* it's deleted text - show it as such */</strong>
}

dfn {
    font-style: italic;
    font-weight: bold;
}

em {
    font-style: italic;
}

fieldset {
    border: 0;
    display: inline;
}

h1, h2, h3, h4, h5, h6 {
    font: bold 1em/1.5 georgia, garamond, "times new roman", times, serif;
}

img {
    border: 0;
    vertical-align: bottom;
}

ins {
    text-decoration: none;
}

strong {
    font-weight: bold;
}

tt {
    display: block;
    margin: 0.5em 0;
    padding: 0.5em 1em;
}

.skip {
    position: absolute;
    left: -999em;
}</pre>
<p>Schulz explained that he didn&#8217;t want to use the universal selector, but he did want to zero out the margins and padding on most elements. Since he always coded under Strict doctype, he didn&#8217;t bother resetting deprecated HTML elements. Schulz set basic font families, and went into some detail about font sizing. He used some of Meyer&#8217;s work on Reset CSS, adding a few &quot;bug-squashing&quot; inclusions.</p>
<h3>Thierry Koblentz&#8217;s base.css</h3>
<p>In March 2010, developer/designer Thierry Koblentz decided to turn the idea of a &quot;global reset&quot; on its head and created a <a href="http://thinkvitamin.com/design/setting-rather-than-resetting-default-styling/">base stylesheet</a> that reset many browser defaults, not necessarily to zero, but to a value he wanted to begin his designs with.</p>
<p>Koblentz&#8217;s <em>base.css</em> is big, but much of it has to do with extensive comment documentation:</p>
<pre>
<strong>/*
 * base.css | v0.4 (06132010) | Thierry Koblentz
 *
 * The purpose of this styles sheet is to set default styles for common browsers and address common issues (missing scrollbar, extended buttons in IE, gap below images, etc.)
 *
 * See: http://thinkvitamin.com/design/setting-rather-than-resetting-default-styling/
 *
 * Changes in this version:
 *    - input, button, textarea, select, optgroup, option {line-height: 1.4 !important;} (to override FF's default styling)
 *    - styling &lt;ol&gt; inside &lt;ul&gt; (merci Goulven)
 */

/* using height:100% on html and body allows to style containers with a 100% height
 * the overflow declaration is to make sure there is a gutter for the scollbar in all browsers regardless of content
 * note that there is no font-size declaration set in this rule. If you wish to include one, you should use font-size: 100.01% to prevent bugs in IE and Opera
 */</strong>
html {
  height: 100%;
  overflow-y: scroll;
}
<strong>/* not all browsers set white as the default background color
 * color is set to create not too much contrast with the background color
 * line-height is to ensure that text is legible enough (that there is enough space between the upper and lower line)
 */	</strong>
body {
  height: 100%;
  background: #fff;
  color: #444;
  line-height: 1.4;
}

<strong>/* this choice of font-family is supposed to render text the same across platforms
 * letter-spacing makes the font a bit more legible
 */</strong>
body, input, button, textarea, select {
  font-family: "Palatino Linotype", Freeserif, serif;
  letter-spacing: .05em;
}
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "DejaVu Serif", serif;
  letter-spacing: .1em;
}
pre, tt, code, kbd, samp, var {
  font-family: "Courier New", Courier, monospace;
}

<strong>/* These should be self explanatory
 */</strong>
h1 {font-size: 1.5em;}
h2 {font-size: 1.4em;}
h3 {font-size: 1.3em;}
h4 {font-size: 1.2em;}
h5 {font-size: 1.1em;}
h6 {font-size: 1em;}

h1, h2, h3, h4, h5 {font-weight: normal;}

<strong>/* styling for links and visited links as well as for links in a hovered, focus and active state
 * make sure to keep these rules in that order, with :active being last
 * text-decoration: none is to make the links more legible while they are in a hovered, focus or active state
 * a:focus and :focus are used to help keyboard users, you may change their styling, but make sure to give users a visual clue of the element's state.
 * outline:none used with the pseudo-class :hover is to avoid outline when a user clicks on links
 * note that these last rules do not do anything in IE as this browser does not support "outline"
 */</strong>
a:link {color: #000;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:focus {text-decoration: none;}
a:focus,:focus {outline: 1px dotted #000;}
a:hover,a:active {outline: none;}

<strong>/*
 * This one is commented out as it may be overkill (users who use both a mouse and the keyboard would lose keyboard focus)
 * Besides, this may create a performance issue
 * html:hover a {outline: none;}
 */

/* margin and padding values are reset for all these elements
 * you could remove from there elements you do not used in your documents, but I don't think it'd worth it
 */</strong>
body, p, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, blockquote, th, td {
  margin: 0;
  padding: 0;
}

<strong>/* this is to prevent border from showing around fieldsets and images (i.e., images inside anchors)
 */</strong>
fieldset, img {
  border: 0;
}

<strong>/* to prevent a gap from showing below images in some browsers
 */</strong>
img {vertical-align: bottom;}

<strong>/* Styling of list items
 * This styles sheet contains a class to apply on lists to reset list-type and margin on LIs
 */</strong>
ol li,
ul ol li {list-style-type: decimal;}
ul li {list-style-type: disc;}
ul ul li {list-style-type: circle;}
ul ul ul li {list-style-type: square;}
ol ol li {list-style-type: lower-alpha;}
ol ol ol li {list-style-type: lower-roman;}

<strong>/* These should be self explanatory
 * I believe *most* UAs style sub and sup like this by default so I am not sure there is value to include these rules here
 */</strong>
sub {
  vertical-align: sub;
  font-size: smaller;
}

sup {
  vertical-align: super;
  font-size: smaller;
}

<strong>/* color is to make that element stands out (see color set via body)
 * padding is used so Internet Explorer does not cut-off descenders in letters like p, g, etc.)
 */</strong>
legend {
  color: #000;
  padding-bottom: .5em;
}

<strong>/* according to Eric Meyer's reset: tables still need 'cellspacing="0"' in the markup
 */</strong>
table {
  border-collapse: collapse;
  border-spacing: 0;
}

<strong>/* caption and summary are very important for tabular data but because caption is nearly impossible to style across browsers many authors do not use it or use display:none to "hide" it (which is almost the same as not using it).
 * so to prevent such workaround, I am positioning this element off-screen
 */</strong>
caption {
  position: absolute;
  left: -999em;
}

<strong>/* all th should be centered unless they are in tbody (table body)
 */</strong>
th {text-align: center;}
tbody th {text-align: left;} 

<strong>/* See Eric Meyer's article about Fixed Monospace Sizing
 * http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/
 */</strong>
code {color: #06f;}
code, pre {font-family: "Courier New", monospace, serif; font-size: 1em;}

<strong>/* This should be self explanatory
 */</strong>
blockquote, q, em, cite, dfn, i, cite, var, address {
  font-style: italic;
}

<strong>/* to prevent some browsers from inserting quotes on "q" and "p" ("p" in blockquotes)
 */</strong>
blockquote p:before, blockquote p:after, q:before, q:after {content: '';}

<strong>/* These should be self explanatory
 */</strong>
th, strong, dt, b {
  font-weight: bold;
}

ins {
  text-decoration: none;
  border-bottom: 3px double #333;
}

del {text-decoration: line-through;} 

abbr,
acronym {
  border-bottom: 1px dotted #333;
  font-variant: normal;
} 

<strong>/* Creating white space (vertical gutters) via padding
 * most authors do not set right/left padding or margin on these elements, they rather use an extra wrapper or style the container with padding to create the left and right gap/gutter they need
 * I find that the latter creates less robust layouts because it leads authors to mix padding with width which creates issue with the broken box model (IE5 or IE6 in quirks mode)
 * so imho, setting this style using the child combinator (i.e., div &gt; h1) should be the best way to do it, but unfortunately IE 6 does not support such syntax, so I have to go with the following + a reset (see next rule)
 */</strong>
h1, h2, h3, h4, h5, h6, p, pre, ul, ol, dl, fieldset, address {padding:0 30px;}

<strong>/* this is to reset the left/right gaps (created by the previous and next rules) on nested elements
 */</strong>
dd p, dd pre, dd ul, dd ol, dd dl, li p, li pre, li ul, li ol, li dl, fieldset p, fieldset ul, fieldset ol {
  padding-right: 0;
  padding-left: 0;
}

<strong>/* These should be self explanatory
 */</strong>
dd {
  padding-left: 20px;
  margin-top: .5em;
}

li {margin-left:30px;}

<strong>/* we cannot use padding on a table to create left and right gaps (as we do with the elements above), instead we use margin
 */ </strong>
table {
  margin-right: 30px;
  margin-left: 30px;
} 

<strong>/* we use margin for hr for the same reason we do for table
 */</strong>
hr {
  margin-right: 30px;
  margin-left: 30px;
  border-style: inset;
  border-width: 1px;
}

<strong>/* top margin solution */
/* this is my approach to create white space between elements, you do not have to adhere to it
 * rather than stylling these elements with top and bottom margin, or simply bottom margin I only use top margin
 */</strong>
h1, h2, h3, h4, h5, h6, p, pre, dt, li, hr, legend, input, button, textarea, select, address, table {margin-top: 1.2em;}

<strong>/* top padding solution */
/* this is a different approach which may be less frustrating for novice because it avoids running into collapsing margin and allows to clear floats while preserving space above the element
 * if you decide to give this a try, then comment out the above rule and uncomment the two next ones
 */
 /*
 h1, h2, h3, h4, h5, h6, p, pre, dt, dd, li, legend, address {padding-top: 1.2em;}
 hr, input, button, textarea, select, table {margin-top: 1.2em;}
 */</strong>

<strong>/* form elements
 * this should not affect the layout of the labels unless you style them in a way that padding applies
 * if I include this here it is mostly because when labels are styled with float and clear, top padding creates a gap between labels (bottom margin would, but not top margin)
 */</strong>
label {padding-top: 1.2em;}

<strong>/* line height helps to set the vertical alignment of radio buttons and check boxes (remember to group these in fieldsets)
 */</strong>
fieldset {line-height: 1;}

<strong>/* vertical alignment of checkboxes (a different value is served to IE 7)
 */</strong>
input[type="checkbox"] {
  vertical-align: bottom;
  *vertical-align: baseline;
}

<strong>/* vertical alignment of radio buttons
 */</strong>
input[type="radio"] {vertical-align: text-bottom;}

<strong>/* vertical alignment of input fields for IE 6
 */</strong>
input {_vertical-align: text-bottom;}

<strong>/* a specific font-size is set for these elements
 * the line-height is to override FF's default styling
 */</strong>
input, button, textarea, select, optgroup, option {
  font-size: .9em;
	line-height: 1.4 !important;
}

<strong>/* this is to fix IE 6 and 7 which create extra right/left padding on buttons
 * IMPORTANT: because IE 6 does not understand the first selector below, you need to apply the class "inputButton" to all input of type="button" in your documents
 * the first declaration is for IE 6 and 7, the second one for IE 6 only, the third one is for all browsers.
 */</strong>
button,
input[type="submit"],
input[type="reset"],
input[type="button"],
.inputButton {
  *overflow: visible;
  _width: 0;
  padding: .2em .4em;
}

<strong>/* classes
 * to style elements with the default padding and margin we set on headings, paragraphs, lists, etc.
 * for example, this class could be used on a DIV inside a blockquote or a DIV inside a FORM, etc.
 */</strong>
.block {
  padding: 0 30px;
  margin-top: 1.2em;
}

<strong>/* to swap padding for margin
 * for example, this class could be used on a heading you'd style with a bottom border
 */</strong>
.padding2margin {
  margin-right: 30px;
  margin-left: 30px;
  padding-right: 0;
  padding-left: 0;
}
<strong>/* list items are styled by default with markers (disc, etc.) and left margin
 * if you apply the class "noMarker" to a list, its items won't display markers and won't have left margin
 */</strong>
.noMarker li {
  list-style: none;
  margin-left: 0;
}</pre>
<p>Koblentz&#8217;s <em>base.css</em> does a number of things other resets do not, including:</p>
<ul>
<li>Forcing a gutter for a vertical scrollbar</li>
<li>Incorporating an IE button fix</li>
<li>Prevention of what he calls &quot;mysterious gaps below images&quot;</li>
<li>Stopping the <a href="http://en.wikipedia.org/wiki/Descender">descender</a> of some letters from being cut off inside <code>&lt;legend&gt;</code> elements in IE</li>
<li>Vertically aligning checkboxes and radio buttons with their label</li>
<li>Setting a default color background for the document</li>
<li>Styling lists by default</li>
<li>Creating horizontal and vertical whitespace</li>
</ul>
<p>Like some other resets, Koblentz warns that <em>base.css</em> includes IE &quot;hacks&quot; that prevent the stylesheet from validating.</p>
<h3>Simple Reset</h3>
<p>In April 2010, Russ Weakley gave us a much more targeted and limited reset, which he called <a href="http://www.maxdesign.com.au/articles/css-reset/">Simple Reset</a>.</p>
<pre>
<strong>/* ----------------------------
simple reset
---------------------------- */</strong>

html, body, ul, ol, li, form, fieldset, legend
{
	margin: 0;
	padding: 0;
}

h1, h2, h3, h4, h5, h6, p { margin-top: 0; }

fieldset,img { border: 0; }

legend { color: #000; }

li { list-style: none; }

sup { vertical-align: text-top; }

sub { vertical-align: text-bottom; }

table
{
	border-collapse: collapse;
	border-spacing: 0;
}

caption, th, td
{
	text-align: left;
	vertical-align: top;
	font-weight: normal;
}

input, textarea, select
{
	font-size: 110%;
	line-height: 1.1;
}

abbr, acronym
{
	border-bottom: .1em dotted;
	cursor: help;
}</pre>
<p>In his explanation of Simple Reset, he noted that it removed margins and padding only from selected elements, as opposed to the wholesale removal made by the resets that rely on the universal selector.</p>
<p>Other things Simple Reset does:</p>
<ul>
<li>Removes top margins on paragraphs and headings</li>
<li>Removes borders from fieldsets and images</li>
<li>Sets table borders and spacing</li>
<li>Sets values for a number of table-related elements (such as <code>&lt;th&gt;</code> and <code>&lt;td&gt;</code>)</li>
<li>Applies <code>font-size</code> and <code>line-height</code> to <code>form</code> elements</li>
<li>Removes list item bullets</li>
<li>Gives attributes to the rarely styled <code>&lt;abbr&gt;</code> and <code>&lt;acronym&gt;</code> elements</li>
<li>Gives a vertical alignment value to <code>&lt;sup&gt;</code> and <code>&lt;sub&gt;</code> elements to avoid <code>line-height</code> issues</li>
</ul>
<p>Weakley reminded CSS reset users: &quot;As with any of the resets, you should do what you feel comfortable doing!&quot;</p>
<p>He echoed Eric Meyer in reminding users of Reset CSS that these style rules are not &quot;self-contained black box[es] of no-touchiness,&quot; but tools to be used, tweaked, and modified for the project&#8217;s needs.</p>
<h3>CSS Mini Reset</h3>
<p>Designer Vladimir Carrer combined elements from Weakley&#8217;s and Meyer&#8217;s resets to create what he called the <a href="http://www.vcarrer.com/2010/05/css-mini-reset.html">CSS Mini Reset</a>:</p>
<pre>
<strong>/* CSS Mini Reset */</strong>

html, body, div, form, fieldset, legend, label
{
 margin: 0;
 padding: 0;
}

table
{
 border-collapse: collapse;
 border-spacing: 0;
}

th, td
{
 text-align: left;
 vertical-align: top;
}

h1, h2, h3, h4, h5, h6, th, td, caption { font-weight:normal; }

img { border: 0; }</pre>
<p>It is much less overarching than either Weakley&#8217;s or Meyer&#8217;s efforts, focusing primarily on resetting margins and padding, stripping default values from <code>table</code> elements, resetting headings to normal font weight, and removing borders from margins.</p>
<p>Carrer says that CSS Mini Reset is best used &quot;when you actually don&#8217;t want to reset everything.&quot;</p>
<p>Carrer based his reset on <a href="http://code.google.com/p/azbuka/">Azbuka</a>, an earlier and much more complex effort at a typographically-based reset and base stylesheet he created in 2009.</p>
<h3>Soft Reset</h3>
<p>Around the same time Carrer released his reset, web designer Mark Aplet contributed his <a href="http://www.visual28.com/articles/css-reset">Soft Reset</a>. Aplet explained that his reset &quot;attempts to hone in and reset only the properties that really need to be reset, leaving some styling to the browser.&quot;</p>
<pre>
<strong>/* Soft Reset */</strong>
body, div, dl, dt, dd, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td { margin:0; padding:0; }
table { border-collapse:collapse; border-spacing:0; }
fieldset, img { border:0; }
h1, h2, h3, h4, h5, h6, address, caption { font-style:normal; font-size:100%; font-weight:normal; }
caption, th { text-align:left; }
ol.listreset, .listreset ol, ul.listreset, .listreset ul, .listreset li { margin:0; padding:0; list-style:none; }</pre>
<p>Aplet&#8217;s <code>.listreset</code> class was inspired by Nicole Sullivan&#8217;s <a href="https://github.com/stubbornella/oocss/wiki/">Object Oriented CSS</a>, (OO CSS) stating that reusable classes are &quot;performance freebies.&quot; On large-scale sites, he says that abstracting CSS &quot;can greatly improve your application performance&quot; and &quot;save you hundreds of lines of code.&quot;</p>
<h3>Less is More Reset</h3>
<p>In June 2007, Web developer Ed Eliot provided an even more stripped-down reset; something he called the <a href="http://www.ejeliot.com/blog/85">Less is More</a> reset:</p>
<pre>
body {
padding: 0;
margin: 0;
font: 13px Arial, Helvetica, Garuda, sans-serif;
<strong>*font-size: small;
*font: x-small;</strong>
}
h1, h2, h3, h4, h5, h6, ul, li, em, strong, pre, code {
padding: 0;
margin: 0;
line-height: 1em;
font-size: 100%;
font-weight: normal;
font-style: normal;
}
table {
font-size: inherit;
font: 100%;
}
ul {
list-style: none;
}
img {
border: 0;
}
p {
margin: 1em 0;
}</pre>
<p>Less is More, Eliot explains, &quot;only affects the elements I most often find myself needing to reset.&quot;</p>
<p>There are hacks in the stylesheet that handle some IE issues (highlighted above); unfortunately, they render the CSS invalid when checked against W3C standards.</p>
<p>For those who insist on validation, Eliot recommends moving them to a separate file and using conditional comments.</p>
<h3>The Visibility:Inherit Reset</h3>
<p>In August 2009, web designer Eric Watson made his own <a href="http://www.visibilityinherit.com/code/initial-css-settings.php">base stylesheet</a> available. It included a small but powerful reset, shown below:</p>
<pre>
<strong>/* -------------------- Resets --------------------- */</strong>
body, form, fieldset, ol, ul, li, h1, h2, h3, h4, h5, h6, p {
margin:0;
padding:0;
}
img {
border:0; <strong>/* kills Gecko bug when img's are placed inside links */</strong>
vertical-align:bottom; <strong>/* set vertical align to bottom for IE */</strong>
}</pre>
<h3>Homebrewed CSS Reset</h3>
<p>Jeffrey Way at Nettuts+ shared a method for <a href="http://net.tutsplus.com/html-css-techniques/weekend-quick-tip-create-your-own-resetcss-file/">creating your own reset file</a>. The steps he includes for homebrewing your own <em>reset.css</em> are:</p>
<ol>
<li>Zeroing out margins and padding on many elements</li>
<li>Taking control of font sizing</li>
<li>Creating &quot;default&quot; classes for elements you will use in all of your designs</li>
</ol>
<p>Way shared his own home-brewed <em>reset.css</em> at the end of his discussion (shown below):</p>
<pre>
body, html, div, blockquote, img, label, p, h1, h2, h3, h4, h5, h6, pre, ul, ol,
li, dl, dt, dd, form, a, fieldset, input, th, td
{
margin: 0; padding: 0; border: 0; outline: none;
}  

body
{
line-height: 1;
font-size: 88% <strong>/* Decide for yourself if you want to include this. */;</strong>
}  

h1, h2, h3, h4, h5, h6
{
font-size: 100%;
padding: .6em 0;
margin: 0 15px;
}  

ul, ol
{
list-style: none;
}  

a
{
color: black;
text-decoration: none;
}  

a:hover
{
text-decoration: underline;
}  

.floatLeft
{
float: left;
padding: .5em .5em .5em 0;
}  

.floatRight
{
float: rightright;
padding: .5em 0 .5em .5em;
}</pre>
<h3>HTML5 Resets</h3>
<p>Many professionals are eager to dance with the cute new kid on the block: <a href="http://sixrevisions.com/html/the-only-html5-resources-you-need-for-getting-up-to-speed/" title="The Only HTML5 Resources You Need for Getting Up to Speed - sixrevisions.com">HTML5</a>. Here are some projects that deal with CSS reset in HTML5.</p>
<h4>HTML5Reset</h4>
<p>Rich Clark and the folks at <a href="http://html5reset.org/">HTML5Reset</a> have given us an expansive reset crafted for HTML5.</p>
<p><a href="http://html5reset.org/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/dcca6_06-02_html5reset.jpg" width="550" height="273" alt="HTML5Reset" /></a></p>
<p>The project comes in several flavors; here is the <em>Bare Bones </em>version:</p>
<pre>
<strong>/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
*/</strong>

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

body {
    line-height:1;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
    display:block;
}

nav ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content:'';
    content:none;
}

a {
    margin:0;
    padding:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

<strong>/* change colours to suit your needs */</strong>
ins {
    background-color:#ff9;
    color:#000;
    text-decoration:none;
}

<strong>/* change colours to suit your needs */</strong>
mark {
    background-color:#ff9;
    color:#000;
    font-style:italic;
    font-weight:bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom:1px dotted;
    cursor:help;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

<strong>/* change border colour to suit your needs */</strong>
hr {
    display:block;
    height:1px;
    border:0;
    border-top:1px solid #cccccc;
    margin:1em 0;
    padding:0;
}

input, select {
    vertical-align:middle;
}</pre>
<p>The CSS reset is based on Eric Meyer&#8217;s Reset CSS. As explained by Clark, it goes significantly farther than your average global reset stylesheet. It removes elements that have been deprecated from the HTML5 specs, adds new HTML5 elements to remove default padding, margins, and borders, and corrects the frequently repeated &quot;unstyling&quot; of the <code>:focus</code> pseudo-class.</p>
<p>Clark notes that some of the code included in the HTML5 reset is there more by personal preference than anything else (a caveat that is essentially true of all the resets available).</p>
<p>The creators of HTML5Reset says that although the reset is not &quot;the end-all and beat-all&quot; solution, they think that &quot;it&#8217;s a fairly good starting place that anyone can take and make their own.&quot;</p>
<p>Clark explained some of his thinking behind the HTML5 reset:</p>
<blockquote><p>When I decided to create a reset stylesheet for HTML5, it was primarily for a project I was working on and figured I might as well release it to be used, modified and improved by the community at large. The main differences from Eric&#8217;s stylesheet &#8230; are the removal of those absent elements in HTML5, including the new elements and declaring those as block level elements (something that will later be built into browser stylesheets and can be removed from the reset). Also included is some baseline styling for the mark element and a few other bits that I tend to use in every project so it makes sense for me to include them. I also decided to remove the default anchor styling from Eric&#8217;s stylesheet so that the outline wasn&#8217;t suppressed on links. It has a comment in Eric&#8217;s original but rarely seemed to get changed by authors. This highlights one of the biggest issues with CSS resets — you have to craft your own that works for you and for specific projects. It&#8217;s unlikely that a reset that works for one site will be exactly what&#8217;s required for the next. I&#8217;d always suggest using a reset as a starting point and then modifying it for your own needs.</p>
</blockquote>
<h4>CSS Reset &#8211; Refreshed</h4>
<p>Web designer Jeffrey King  updated Meyer&#8217;s original reset for HTML5; his revision is called <a href="http://kingdesk.com/articles/css-reset/">CSS Reset &#8211; Refreshed</a>:</p>
<pre>
<strong>/* v1.2 | 20100218 */

/* Eric Meyer's original CSS Reset is found at
   http://meyerweb.com/eric/tools/css/reset/ */

/* This version's permalink is
   http://kingdesk.com/articles/css-reset/ */</strong>

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
section, article, aside, hgroup, header,
footer, nav, dialog, figure, menu,
video, audio, mark, time, canvas, details {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
	}
section, article, aside, hgroup, header,
footer, nav, dialog, figure, figcaption {
	display: block;
	}
body {
	line-height: 1;
	}
ol, ul {
	list-style: none;
	}
blockquote, q {
	quotes: none;
	}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
	}
:focus { <strong>/* remember to define focus styles! */</strong>
	outline: 0;
	}
ins { <strong>/* remember to highlight inserts somehow! */</strong>
	text-decoration: none;
	}
del {
	text-decoration: line-through;
	}
table { <strong>/* markup tables with 'cellspacing="0"' */</strong>
	border-collapse: collapse;
	border-spacing: 0;
	}
</pre>
<h4>HTML5 Boilerplate</h4>
<p>Let&#8217;s end the guide with a wildly popular project that many of us are constantly talking about: Paul Irish&#8217;s and Divya Manian&#8217;s <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>, a fully developed &quot;framework&quot; &#8212; the creators say that it isn&#8217;t a framework &#8212; that includes a robust, HTML5-friendly reset.</p>
<p><a href="http://html5boilerplate.com/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/983db_06-03_html5_boilerplate.jpg" width="550" height="264" /></a></p>
<p>The CSS reset in HTML5 Boilerplate is an amalgamation of HTML5Reset and Eric Meyer&#8217;s Reset Reloaded + HTML5 baseline.</p>
<pre>
<strong>/*
  html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
  v1.4 2009-07-27 | Authors: Eric Meyer &#038; Richard Clark
  html5doctor.com/html-5-reset-stylesheet/
*/</strong>

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
  margin:0;
  padding:0;
  border:0;
  outline:0;
  font-size:100%;
  vertical-align:baseline;
  background:transparent;
}                  

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display:block;
}

nav ul { list-style:none; }

blockquote, q { quotes:none; }

blockquote:before, blockquote:after,
q:before, q:after { content:''; content:none; }

a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }

ins { background-color:#ff9; color:#000; text-decoration:none; }

mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }

del { text-decoration: line-through; }

abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }

<strong>/* tables still need cellspacing="0" in the markup */</strong>
table { border-collapse:collapse; border-spacing:0; }

hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }

input, select { vertical-align:middle; }

<strong>/* END RESET CSS */</strong>
</pre>
<p>Clark (one of the creators of HTML5Reset) says that HTML5 Boilerplate &quot;really highlights how the web community is very good at sharing and opening up for public use.&quot;</p>
<h3>Conclusion</h3>
<p>There are many options for setting your CSS to baseline defaults, as can be seen above. What&#8217;s important to note is that you should use what works best for you and the project at hand. You can use an already-existing reset stylesheet, piece several of them together, or build your own from scratch; the choice is yours.</p>
<p>The third and final part of this series discusses the ongoing debate on whether or not we should reset our CSS in our site builds.</p>
<p>This is a three-part series of articles on the topic of CSS resets.</p>
<ul>
<li><a href="http://sixrevisions.com/css/the-history-of-css-resets/">Part 1: The History of CSS Reset</a></li>
<li>Part 2: A Comprehensive Guide to CSS Resets</li>
<li>Part 3: Should You Use CSS Reset? (coming soon)</li>
</ul>
<h3>Related Content</h3>
<ul>
<li><a href="http://sixrevisions.com/css/css-tips/css-tip-1-resetting-your-styles-with-css-reset/">Resetting Your Styles with CSS Reset</a></li>
<li><a href="http://sixrevisions.com/css/css-tips/css-tip-2-structural-naming-convention-in-css/">Structural Naming Convention in CSS</a></li>
<li><a href="http://sixrevisions.com/css/100-exceedingly-useful-css-tips-and-tricks/">100 Exceedingly Useful CSS Tips and Tricks</a></li>
<li><em>Related categories</em>: <a href="http://sixrevisions.com/category/css/">CSS</a> and <a href="http://sixrevisions.com/category/web_design/">Web Design</a></li>
</ul>
<h3>About the Author</h3>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/65461_michael_tuck_small.jpg" alt="" width="80" height="80" /><strong>Michael Tuck</strong> is an educator, writer, and freelance web designer. He serves as an advisor to the <a href="http://www.sitepoint.com/forums/forumdisplay.php?f=1" title="SitePoint Web Design Forum">Web Design forum on SitePoint</a>. When he isn&#8217;t teaching or designing sites, he is doing research for the <a href="http://www.historycommons.org" title="History Commons">History Commons</a>. You can contact him through his website, <a href="http://www.iraqtimeline.com/maxdesign/" title="Black Max Web Design">Black Max Web Design</a>.</p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/57451_PAvSa5pck28" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/SixRevisions">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/a-comprehensive-guide-to-css-resets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Combining media queries and JavaScript</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/combining-media-queries-and-javascript/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/combining-media-queries-and-javascript/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 20:22:31 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[web resources]]></category>
		<category><![CDATA[conventional view]]></category>
		<category><![CDATA[declarations]]></category>
		<category><![CDATA[functionalities]]></category>
		<category><![CDATA[grigsby]]></category>
		<category><![CDATA[mapping application]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[problem areas]]></category>
		<category><![CDATA[screen resolutions]]></category>
		<category><![CDATA[style sheet]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/combining-media-queries-and-javascript/</guid>
		<description><![CDATA[On Tuesday Jason Grigsby challenged the conventional view that media queries are all we need to make a website mobile-friendly. Although he&#8217;s right when he points out some serious problems, I do not think that media queries are the &#8220;fool&#8217;s gold,&#8221; as Jason says. The message seems to be more that media queries alone are [...]]]></description>
			<content:encoded><![CDATA[<p>On Tuesday Jason Grigsby <a href="http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/">challenged the conventional view</a> that media queries are all we need to make a website mobile-friendly. Although he&#8217;s right when he points out some serious problems, I do not think that media queries are the &#8220;fool&#8217;s gold,&#8221; as Jason says. The message seems to be more that media queries alone are not enough to make your sites mobile-friendly. An additional component is required.</p>
<p>To recap briefly, this is a media query:</p>
<pre>
.sidebar {
	float: right;
	width: 250px;
}

@media all and (max-device-width: 600px) {
	.complicatedFunctionality {
		display: none;
	}
	.sidebar {
		float: none;
		width: auto;
	}
}
</pre>
<p>The media query asks whether the width of the device is 600px at maximum. If it is, the special styles are executed. This usually comes down to hiding advanced functionalities that do not make sense on mobile or take too much bandwidth, while it can also be used to change the site&#8217;s grid from horizontally oriented to vertically oriented; for instance by placing a sidebar not right of the main content, but below it.</p>
<p>Technically, the <code>.complicatedFunctionality</code> and <code>.sidebar</code> declarations are added to the style sheet only when the query returns true, i.e. the device is less than 600px wide.</p>
<p>Now this works. Better still, media queries are the ideal way of adapting your design to different screen resolutions. Still, they are not the be-all-end-all of making your website mobile-friendly.</p>
<p>Jason identifies two main problem areas:</p>
<ul>
<li>It&#8217;s all very well to hide, say, an advanced mapping application on mobile, but if you use only media queries the browser will still download the scripts associated with the application.</li>
<li>Even though images might be hidden from mobile browsers, or low-source ones should be used, the browser still downloads the full-source variants.</li>
</ul>
<p>In other words, media queries do not stop the browser from downloading assets that will not be used on a mobile phone. And with bandwidth at a premium, this is a serious problem.</p>
<p>He concludes:</p>
<blockquote>
<p>CSS media queries are a tool, but they are not a silver bullet.</p>
</blockquote>
<p>I mostly, but not entire agree. Media queries <em>are</em> silver bullets when it comes to <em>pure CSS</em>. Restricting the width of your site, moving sidebars and main navigations elsewhere, media queries can do all that and more.</p>
<p>The trick, however, is that a pure CSS approach is not enough. In addition we need a JavaScript that also reads out the media queries and uses the data to decide whether to download the complicated mapping script, whether to download the low-source or the full-source images, or possibly none.</p>
<p>As far as I know there is no direct access to media queries from JavaScript. You can&#8217;t read out whether the example media query above has fired or not.</p>
<h3>JavaScript pairing</h3>
<p>Fortunately, there is a pretty safe way of using JavaScript in conjunction with media queries. It turns out that <em>all browsers</em> I tested so far have paired the <code>width</code> and <code>device-width</code> media queries with the values of <code>document.documentElement. clientWidth</code> and <code>screen.width</code>, respectively.</p>
<p>This is a <em>general rule</em>. All mobile browsers that support media queries exhibit these pairings. It&#8217;s hard to believe, but I haven&#8217;t found any exceptions yet &#8212; and rest assured that I searched for them, because I could not believe that it would be this simple. And I will continue to keep an eye on this and report problems as soon as I find them.</p>
<p>One caveat, though: although the pairing exists in all browsers, some browsers report incorrect values for <code>document.documentElement. clientWidth</code> and <code>screen.width</code>. However, these browsers will also fire media queries based on these incorrect values, so the net result remains that both media query and script are executed, although at the wrong time. See the <a href="http://www.quirksmode.org/mobile/tableViewport.html">viewport compatiblity table</a> for the gory details.</p>
<p>Therefore, if we want a JavaScript component that fires when the example media query above is triggered, we simply do:</p>
<pre>
if (screen.width &lt; 600) {
	// don&#8217;t download complicated script
	// use low-source images instead of full-source ones
}
</pre>
<p>I think it&#8217;s best to reverse the script logic:</p>
<pre>
if (screen.width &gt;= 600) {
	// download complicated script
	// swap in full-source images for low-source ones
}
</pre>
<p>If you want to use <code>width</code> instead, do this:</p>
<pre>
@media all and (max-width: 900px) {
	// styles
}

if (document.documentElement.clientWidth &lt; 900) {
	// scripts
}
</pre>
<p>Thus it is quite possible to pair a JavaScript routine with your media queries, and use it to decide which assets you should and should not download.</p>
<p>When these scripts are <em>added to</em> media queries, we&#8217;re a whole lot closer to making one website that reacts to a mobile (or rather, a narrow-screen) environment both in its CSS and in its asset management.</p>
<p><a href="http://www.quirksmode.org/blog/atom.xml">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/combining-media-queries-and-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: From Kubrick to Twenty Ten</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/wordpress-from-kubrick-to-twenty-ten/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/wordpress-from-kubrick-to-twenty-ten/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 21:33:10 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[abstraction]]></category>
		<category><![CDATA[default theme]]></category>
		<category><![CDATA[imminent release]]></category>
		<category><![CDATA[kubrick]]></category>
		<category><![CDATA[style css]]></category>
		<category><![CDATA[style guides]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[tough times]]></category>
		<category><![CDATA[wysiwyg editor]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/wordpress-from-kubrick-to-twenty-ten/</guid>
		<description><![CDATA[Kubrick, the default theme for WordPress since 2005, got many Web and open-source enthusiasts through some pretty tough times. Developers have modified it, bloggers have learned HTML and CSS on it, and designers have made it their go-to template for designing blogs of all sizes for clients. But let&#8217;s face it: five years on the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webdesignerdepot.com/2010/06/wordpress-from-kubrick-to-twenty-ten/"><img class="alignleft" src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f4239_thumb.jpg" alt="" width="200" height="160" /></a><strong>Kubrick</strong>, the default theme for WordPress since 2005, got many Web and  open-source enthusiasts through some pretty tough times.</p>
<p>Developers  have modified it, bloggers have learned HTML and CSS on it, and  designers have made it their go-to template for designing blogs of all  sizes for clients.</p>
<p>But let&#8217;s face it: five years on the Web is like a  hundred years anywhere else, and Kubrick, even according to its  creators, is due for an update.</p>
<p>Enter <strong>&#8220;Twenty Ten&#8221;</strong> the new default theme for WordPress 3.0,  which is scheduled for an imminent release. Not only does it address  general changes in Web standards and style guides, it takes into account  the clamoring of designers who love WordPress but have had a hard time  applying new principles to an older theme.<span></span></p>
<p>It&#8217;s got meatier CSS, more  functionality, increased abstraction and a few other deviations from  Kubrick that every theme developer should know about.</p>
<p>These changes  should ensure that designers who are already WordPress fans will embrace  it, and its flexibility increases the likelihood that WordPress itself  will continue its march across the CMS arena.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/252ec_image001.jpg" alt="" width="615" height="300" /></p>
<p><br class="spacer_" /></p>
<h1>A Quick Look</h1>
<ul>
<li>Kubrick: 26 files and 1 folder (87.4 KB)</li>
<li>Twenty Ten: 42 files and 3 folders (547 KB)</li>
</ul>
<p>As you can see, Twenty Ten is a heavier theme than Kubrick. Much of  the extra weight comes from a different (and markedly improved) way of  abstracting the functions and page types that designers once had to  change by hacking them or rewriting the code.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/252ec_image003.jpg" alt="" /></p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2a9a3_image005.jpg" alt="" /></p>
<p><br class="spacer_" /></p>
<h1>Charting the Changes</h1>
<p><strong><em>editor-style.css</em> (new)</strong><br />
 One basic yet exciting change is the above style sheet, which gives  designers a way to define the styles of the WYSIWYG editor in the  WordPress admin. By matching the styles of your templates and blog in  this file, the WYSIWYG editor offers a truer representation of what gets  published.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2a9a3_image007.jpg" alt="" /></p>
<p><strong><em>style.css</em> (new)<br />
 </strong>Another surprising statistic, like the difference in the sizes of  files and folders, is the increase in lines of CSS. They have almost  doubled: from 719 lines to 1343. What&#8217;s all that extra code doing  there? Well, the additions include a &#8220;Print Media&#8221; section that  defines styles for website visitors who want to read posts while on the  go; a mobile Safari section to accommodate iPhone and iPad users; and a  section dedicated to custom navigation styling (a new feature in  WordPress 3.0). The code is well organized, but you&#8217;ll still have to do a  typical search for all instances of, say, a hover or accent color.</p>
<p><strong><em>author.php</em></strong><br />
 Another great new function in WordPress 3.0 is the ability to make  author-specific templates. This paves the way for files like <em>author-john.php</em> and <em>author-bob.php</em>, so that everyone who publishes on a blog  can have their own visual style.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c4ab2_image009.jpg" alt="" /></p>
<p><strong><em>category.php</em>, <em>tag.php</em><br />
 </strong>The <em>archive.php</em> file has lost the functions <code>if  (is_category())</code> and <code>if (is_tag())</code> in exchange for  the added flexibility of abstracting these templates to separate files.  This makes customizing easier than ever, especially with the increased  functionality of taxonomies.</p>
<p><strong><em>loop.php</em><br />
 </strong>If you look in Twenty Ten&#8217;s <em>index.php</em> file, you&#8217;ll notice  something is missing: no loop! That&#8217;s because many frequently used loops  have been relocated to the <em>loop.php</em> file so that they can be  called from multiple files without having to copy and paste code. This  also reduces the weight of some new pages, such as <em>category.php</em> and <em>tag.php</em>. But be warned: if you&#8217;re looking to create a  custom loop for, say, <em>index.php</em>, don&#8217;t mess with <em>loop.php</em>.  Create a new file called <em>loop-index.php</em>, and put your custom  loop in there. That&#8217;s what the <code>get_template_part( 'loop', 'index' )</code> is for; it lets you make these changes non-destructively.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c4ab2_image011.jpg" alt="" /></p>
<p><strong><em>onecolumn-page.php</em></strong><br />
 Have you ever wanted to leave the sidebar off of just one page?  Twenty Ten&#8217;s admin option has you covered and it&#8217;s got a convenient  template to boot!</p>
<p><strong><em>sidebar-footer.php</em></strong><br />
 A recent trend among Web design gurus is to create an expanded footer  area with information that is more useful and compelling than the usual  contact info and copyright. The <em>sidebar-footer.php</em> file  accommodates an expanded footer by allowing you to style sections in  such a way that widgets can be injected in the footer area.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/7607e_image013.jpg" alt="" /></p>
<p><strong><em>attachment.php</em></strong><br />
 This template file replaces the <em>image.php</em> file and does a  much better job of accommodating all of the different types of files  we&#8217;re now used to publishing in WordPress.</p>
<p>The changes above may look minor to the untrained eye, but they&#8217;re a  reason to rejoice if you&#8217;ve ever created or modified a WordPress  theme or been frustrated by its lack of control or extensibility.</p>
<p>By  scrapping Kubrick and listening to the concerns of developers, WordPress  has managed to incorporate in Twenty Ten the changes needed to bring  the now-flourishing CMS into the new decade.</p>
<p>We&#8217;re pretty excited, as  are most designers and developers who love WordPress, to see 3.0 up and  running, and a major reason for that excitement is the flexibility and  personalization offered by Twenty Ten.</p>
<p><br class="spacer_" /></p>
<p><em>Written exclusively for Webdesigner Depot by Blue Derkin, a project a social media lead for <a rel="nofollow" href="http://www.inmotionhosting.com/" target="_blank">webhosting</a> company InMotion Hosting. He also blogs at Web Hosting Help Guy.</em></p>
<p><em><strong>What do you think of the upcoming changes in WordPress? What features are you looking forward to the most?</strong><br />
 </em></p>
<p>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: M7ZD0X</p>
<p><a href="http://feedads.g.doubleclick.net/~a/8IWW_ESj7YFvzyBZZWjek4zTe3s/0/da"><img src="http://feedads.g.doubleclick.net/~a/8IWW_ESj7YFvzyBZZWjek4zTe3s/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/8IWW_ESj7YFvzyBZZWjek4zTe3s/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/938a0_di" border="0"></img></a></p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/938a0_9lWd9gv-FLc" height="1" width="1" /><br />
<a href="http://www.webdesignerdepot.com/feed/">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/wordpress-from-kubrick-to-twenty-ten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Animated wicked CSS3 3d bar chart</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/animated-wicked-css3-3d-bar-chart/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/animated-wicked-css3-3d-bar-chart/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 12:43:41 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[different style]]></category>
		<category><![CDATA[original article]]></category>
		<category><![CDATA[previous version]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[sneak peak]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[Transitions]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/animated-wicked-css3-3d-bar-chart/</guid>
		<description><![CDATA[Do you remember the Wicked CSS3 3d bar chart that I placed online a couple of weeks ago? Paul Irish left a comment, requesting for an example with transitions. My reply was that I was already working on that, and today I&#8217;m proud to release the animated wicked CSS3 3d bar chart. The principle is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedads.g.doubleclick.net/~a/wrx_EtjuTSgBOgdFWVtsuKacejI/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f2653_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/wrx_EtjuTSgBOgdFWVtsuKacejI/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/efc1b_di" border="0"></img></a></p>
<p>Do you remember the <a href="http://www.marcofolio.net/css/wicked_css3_3d_bar_chart.html" title="Wicked CSS3 3d bar chart"><strong>Wicked CSS3 3d bar chart</strong></a> that I placed online a couple of weeks ago? <em><a href="http://www.marcofolio.net/css/wicked_css3_3d_bar_chart.html#josc18985" title="Paul Irish - moar css transitions">Paul Irish</a></em> left a comment, requesting for an example with transitions. My reply was that I was already working on that, and today I&#8217;m proud to release the <strong>animated wicked CSS3 3d bar chart</strong>.</p>
<p>The principle is the same as the previous version: Create a beautiful 3d bar chart. But this time, we don&#8217;t create a &quot;stacked&quot; one (since animation would be hard), but several bars placed under each other. When hovering, the animation shows and the bar will grow to the appropriate size.</p>
<div>
    <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e50cc_css3_bar_chart_animated.png" alt="Animated wicked CSS3 3d bar chart" />
</div>
<p>One of the neatest things of this example (in my opinion), is that it uses <strong>the exact same HTML</strong> (except for the title) as the original article (<em>wicked CSS3 3d bar chart</em>). It&#8217;s a great example to show what you can do with flexible CSS; You can create a totally different page with the same HTML and using only a different style sheet file.</p>
<div><a href="http://demo.marcofolio.net/css3_bar_chart_animated/" title="Demo Animated wicked CSS3 3d bar chart"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5e455_demo.png" alt="Demo Animated wicked CSS3 3d bar chart" /></a>&nbsp;&nbsp;<br />
<a href="http://www.marcofolio.net/downloads/css/animated_wicked_css3_3d_bar_chart/download.html" title="Download Animated wicked CSS3 3d bar chart"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5e455_download.png" alt="Download Animated wicked CSS3 3d bar chart" /></a></div>
<p>Take note that this example only works in <code>-webkit</code> based browsers (Safari and Chrome), because those are the browsers that currently only support CSS3 animation (The next version of Firefox will support animations too). So, once again, this example is just a sneak peak into some awesome stuff CSS3 can do for us.</p>
<p><a href="http://www.marcofolio.net/css/animated_wicked_css3_3d_bar_chart.html">Read more&#8230;</a></p>
<div>
</div>
<p><a href="http://feeds2.feedburner.com/marcofolio">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/tutorial/animated-wicked-css3-3d-bar-chart/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting rather than Resetting Default Styling</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/setting-rather-than-resetting-default-styling/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/setting-rather-than-resetting-default-styling/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 07:30:05 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[web resources]]></category>
		<category><![CDATA[clean slate]]></category>
		<category><![CDATA[eric meyer]]></category>
		<category><![CDATA[Jens]]></category>
		<category><![CDATA[koblentz]]></category>
		<category><![CDATA[middle man]]></category>
		<category><![CDATA[snook]]></category>
		<category><![CDATA[style elements]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[unaltered state]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/setting-rather-than-resetting-default-styling/</guid>
		<description><![CDATA[Editors Note: In his first article for Think Vitamin Thierry Koblentz discusses the issue of &#8220;resetting&#8221; your CSS. &#8220;base.css&#8221; versus &#8220;reset.css&#8221; For a long time, the very first line in my styles sheets was: * {padding:0;margin:0;} This simple rule was very convenient as it leveled margin and padding values of all elements across browsers. This [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fsetting-rather-than-resetting-default-styling%2F"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/67e02_imagebutton.gif?url=http%3A%2F%2Fcarsonified.com%2Fblog%2Fdesign%2Fsetting-rather-than-resetting-default-styling%2F" height="61" width="51" /></a></div>
<p><a href="http://carsonified.com/?administer_redirect_4=http://futureofwebdesign.com/?utm_source=thinkvitamin&amp;utm_medium=banner&amp;utm_campaign=setting_resetting&gt;&lt;img src="><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/11894_fowd_london_2010_side.jpg" alt="Future of Web Design London 2010" width="470" /></a><em></em></p>
<p><em><strong>Editors Note:</strong> In his first article for Think Vitamin Thierry Koblentz discusses the issue of &#8220;resetting&#8221; your CSS.</em></p>
<h3>&#8220;base.css&#8221; versus &#8220;reset.css&#8221;</h3>
<p>For a long time, the very first line in my styles sheets was:</p>
<pre><code>* {padding:0;margin:0;}</code></pre>
<p>This <a title="Fight the (Power) Default" href="http://leftjustified.net/journal/2004/10/07/css-negotiation/">simple rule</a> was very convenient as it leveled margin and padding values of all elements across browsers. This &#8220;hard reset&#8221; was short and simple and it had the advantage of belonging to the main styles sheet rather than being an <a title="Eric Meyer's, Yahoo's and Ed Eliot's Reset" href="http://www.css-reset.com/">external file</a>.</p>
<p>Later, this technique was denounced as <a title="Writing Efficient CSS" href="https://developer.mozilla.org/en/Writing_Efficient_CSS#Guidelines_for_Efficient_CSS">bad practice</a> as it makes the rendering agent style (check) <em>every single element</em> in a document. It also  triggered issues with form controls, but authors were used to specifying styles for these.</p>
<p>Then came  &#8220;reset&#8221; styles sheets. These files go way beyond resetting margin and padding. The most complete in terms of properties/elements involved has to be <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Eric Meyer&#8217;s</a>. It &#8220;unstyles&#8221; everything you could think of, from <tt>a</tt> to <tt>var</tt>.</p>
<p>Authors start with a clean slate. From there, they most often write rules to style elements that were originally styled by the browser&#8217;s styles sheet, but overwritten by the reset file. In short, many elements are styled three times:</p>
<ol>
<li>by the browser&#8217;s styles sheet (see <a href="http://meiert.com/en/blog/20070922/user-agent-style-sheets/">User Agent Styles Sheets</a>).</li>
<li>by the &#8220;reset&#8221; file.</li>
<li>by the author&#8217;s styles sheet.</li>
</ol>
<h3>Criticism of this Approach</h3>
<p><a title="No CSS reset" href="http://snook.ca/archives/html_and_css/no_css_reset/">Jonathan Snook</a>, <a title="Why “Reset” Style Sheets Are Bad" href="http://meiert.com/en/blog/20080419/reset-style-sheets-are-bad/">Jens Meiert</a> and others have &#8220;criticized&#8221; this approach, saying more or less that there was no use for a &#8220;middle man&#8221;. On Jen&#8217;s site,  &#8220;<a href="http://meiert.com/en/blog/20080419/reset-style-sheets-are-bad/#comment-96465">randomCommenter</a>&#8221; summarizes the issue pretty well when asking: <q>“Wouldn’t a well written base style sheet render a reset style sheet redundant and therefore useless?”</q></p>
<p>Actually, I believe Eric Meyer himself hints in that direction when he says:</p>
<blockquote cite="http://meyerweb.com/eric/tools/css/reset/"><p>“I don&#8217;t particularly recommend that you just use this in its  unaltered state in your own projects. It should be tweaked, edited,  extended, and otherwise tuned to match your specific reset baseline.  Fill in your preferred colors for the page, links, and so on.  In other words, this is a starting point, not a self-contained black box of no-touchiness.”</p>
</blockquote>
<p>In any case, people should at least evaluate the rules in these reset files before copying and pasting their content. For example, if one authors documents as HTML 4.01 Strict! one may safely remove from a reset styles sheets any reference to elements like:</p>
<ul>
<li>iframe</li>
<li>applet</li>
<li>strike</li>
<li>u</li>
<li>font</li>
<li>s</li>
<li>center</li>
</ul>
<h3><span></span>My Base Styles Sheet</h3>
<p>Following the idea of &#8220;tweaking&#8221; a reset file, I came up with this &#8220;<a href="http://tjkdesign.com/ez-css/css/base.css">base styles sheet</a>&#8220;. It sets default styling for many elements,  follows a couple of recommendations regarding usability/accessibility, and addresses a few &#8220;common issues&#8221; as well.</p>
<p><strong>What does it do that a reset doesn&#8217;t?</strong></p>
<p>It fixes a few things</p>
<ul>
<li>It forces a gutter for a vertical scrollbar (when content is too short to require a scrollbar)</li>
<li>It includes an <a title="How to remove the extra padding IE creates" href="http://jehiah.cz/archive/an-even-better-ie-button-width-fix">IE button width fix</a></li>
<li>It removes &#8220;sticky&#8221; outline  (not in Internet Explorer though)</li>
<li>It prevents &#8220;<a href="https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps">mysterious gaps below images</a>&#8220;</li>
<li>It prevents descenders letters in <tt>legend</tt> from being cut-off in Internet Explorer</li>
<li>It vertically aligns checkboxes and radio buttons with their label</li>
<li>It sets a default color background for the document with no shrink wrap effect on <tt>body</tt><sup>1</sup></li>
</ul>
<p><strong>It styles lists by default</strong></p>
<p>It is easier to remove markers on lists than to style them. So, by default, lists are styled to show indentation and markers depending on hierarchy and list types. But the styles sheet contains a class to reset this styling. When applied to a <tt>UL</tt> or <tt>OL</tt> &#8211; it will remove markers and left margin on their items.</p>
<p><strong>It creates vertical &#8220;gutters&#8221;</strong></p>
<p>Left and right padding are applied to most block-level elements to create vertical gutters. This allows to build layouts without having to use &#8220;padding&#8221; on main containers which helps to produce designs that do not break in IE 5 (or IE 6 in quirks mode) as width and padding values are not mixed. This is also an alternative to using non semantic wrappers as a workaround to avoid mixing these properties.</p>
<p><strong>Why using padding instead of margin to create that space?</strong></p>
<p>Using padding allows to paint elements&#8217; background all across their parent container. Stretching from one edge to another. When this behavior is not seeked, for example when styling a heading with a bottom border that should be no wider than what appears to be the &#8220;content box&#8221;, authors can use a class (in the sheet already) to revert that styling (swaping padding values with margin values).</p>
<p><strong>It creates horizontal white space too</strong></p>
<ul>
<li><strong>Via margin</strong> &#8211; By default, vertical space is obtained through top margin. A top margin of 1.2em is applied to most block-level elements.</li>
<li><strong>Via padding</strong> &#8211; Authors can uncomment two rules in the styles sheet to create spacing using padding instead of margin. The advantage of this method is that it prevents two common &#8220;issues&#8221;:
<ul>
<li><strong>Collapsing margins </strong>- Margins will not collapse since elements are not styled with vertical (top/bottom) margins.</li>
<li><strong>Loss of top margin when clearing  floats</strong> &#8211; When an element clears a float, it &#8220;loses&#8221; its  top margin, but that gap is preserved if top padding is used instead.</li>
</ul>
</li>
</ul>
<h3>What else?</h3>
<p>Rules in this <a href="http://tjkdesign.com/ez-css/css/base.css">base styles sheet</a> are well commented and values that one would like to change (<tt>font-family</tt>, <tt>font-size</tt>, <tt>line-height</tt>, <tt>color</tt>, <tt>padding</tt>, etc.) are placed near the top of the file.</p>
<p>You can download <a href="http://tjkdesign.com/ez-css/css/base.css">base.css with comments</a> or a <a href="http://tjkdesign.com//ez-css/css/min-base.css">minified version</a>. My advice is to use these rules as a starting point to create your own styles sheet. Do not link to an external file to then override  property values, instead, add, remove and edit anything you want to end up with a main styles sheet for your own project(s).</p>
<p>My <a href="http://tjkdesign.com/ez-css/css/base.css">base.css</a> styles sheet is a work in progress.  If you play with it, and if you see things that should not belong in there or to the contrary things that should be included, please join the discussion.</p>
<p><sup>1</sup> The YUI reset styles sheet sets a background-color on <tt>html</tt>. This styling makes the browser paint the background of <tt>body</tt> no taller than its content instead of matching the viewport&#8217;s height (this is by specs). I believe a future release of YUI reset will include this change.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e45ec_?ak_action=api_record_view&amp;id=4943&amp;type=feed" alt="" />
<div>
</div>
<p><a href="http://feeds2.feedburner.com/vitaminmasterfeed">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-resources/setting-rather-than-resetting-default-styling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a better jQuery stylesheet switcher</title>
		<link>http://www.neurosoftware.ro/programming-blog/blogposter/tutorial/create-a-better-jquery-stylesheet-switcher/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/blogposter/tutorial/create-a-better-jquery-stylesheet-switcher/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 12:36:59 +0000</pubDate>
		<dc:creator>BlogPoster</dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[colour theme]]></category>
		<category><![CDATA[colours]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[little monsters]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[Read]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[switchers]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/blogposter/tutorial/create-a-better-jquery-stylesheet-switcher/</guid>
		<description><![CDATA[Style Sheet switchers (or &#34;colour theme choosers&#34;) are not really that new. Apart from that fact, they still are pretty fun to use and cool to see. I was wondering how jQuery could help me achieve this technique. While searching, I came across several solutions. There is a problem when using these techniques, which I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedads.g.doubleclick.net/~a/svEwwEtV8-YH-LE3gWh8tB_S31M/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a09ae_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/svEwwEtV8-YH-LE3gWh8tB_S31M/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/3e95a_di" border="0"></img></a></p>
<p>Style Sheet switchers (or &quot;<em>colour theme choosers</em>&quot;) are not really that new. Apart from that fact, they still are pretty fun to use and cool to see. I was wondering how <a href="http://jquery.com/" title="jQuery Java Framework">jQuery</a> could help me achieve this technique. While searching, <a href="http://www.kelvinluck.com/2006/05/switch-stylesheets-with-jquery/" title="Switch stylesheets with jQuery">I came across</a> <a href="http://www.cssnewbie.com/simple-jquery-stylesheet-switcher/" title="A Simple jQuery Stylesheet Switcher">several solutions</a>.</p>
<p>There is a problem when using these techniques, which I will explain later. I created a little work-around to <strong>create a better jQuery stylesheet switcher</strong>. We&#8217;ll simply change some colours for the user!</p>
<div>
<img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/615d8_css_switcher.png" alt="jQuery stylesheet switcher" />
</div>
<p>Make sure to check out the demo to view what we&#8217;re trying to accomplish.</p>
<div><a href="http://demo.marcofolio.net/css_switcher/" title="Demo jQuery stylesheet switcher"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/fd899_demo.png" alt="Demo jQuery stylesheet switcher" /></a>&nbsp;&nbsp;<br />
<a href="http://www.marcofolio.net/downloads/webdesign/a_better_jquery_stylesheet_switcher/download.html" title="Download jQuery stylesheet switcher"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/9fff7_download.png" alt="Download jQuery stylesheet switcher" /></a></div>
<p>The cute little monsters used in the demo are created by <a href="http://www.iconspedia.com/pack/creatures/" title="Creates Pack">Fast Icon (Dirceu Veiga)</a>. Now, let&#8217;s take a look at how you can create something like this yourself!</p>
<p><a href="http://www.marcofolio.net/webdesign/create_a_better_jquery_stylesheet_switcher.html">Read more&#8230;</a></p>
<div>
<a href="http://feeds.feedburner.com/~ff/marcofolio?a=lZA24RBuYRQ:AHT2sot7-YA:yIl2AUoC8zA"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/cd763_marcofolio?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/marcofolio?a=lZA24RBuYRQ:AHT2sot7-YA:bcOpcFrp8Mo"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/cd763_marcofolio?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/marcofolio?a=lZA24RBuYRQ:AHT2sot7-YA:gIN9vFwOqvQ"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ae38f_marcofolio?i=lZA24RBuYRQ:AHT2sot7-YA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/marcofolio?a=lZA24RBuYRQ:AHT2sot7-YA:F7zBnMyn0Lo"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ae38f_marcofolio?i=lZA24RBuYRQ:AHT2sot7-YA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/marcofolio?a=lZA24RBuYRQ:AHT2sot7-YA:V_sGLiPBpWU"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ae38f_marcofolio?i=lZA24RBuYRQ:AHT2sot7-YA:V_sGLiPBpWU" border="0"></img></a>
</div>
<p><a href="http://feeds2.feedburner.com/marcofolio">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/blogposter/tutorial/create-a-better-jquery-stylesheet-switcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Old Browsers: Do they still exist?</title>
		<link>http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/old-browsers-do-they-still-exist/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/old-browsers-do-they-still-exist/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 07:33:37 +0000</pubDate>
		<dc:creator>BlogPoster</dc:creator>
				<category><![CDATA[web resources]]></category>
		<category><![CDATA[default font]]></category>
		<category><![CDATA[good stuff]]></category>
		<category><![CDATA[internet explorer 3]]></category>
		<category><![CDATA[line in the sand]]></category>
		<category><![CDATA[linear content]]></category>
		<category><![CDATA[long time]]></category>
		<category><![CDATA[old version]]></category>
		<category><![CDATA[opera users]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[web browsers]]></category>
		<category><![CDATA[whole enchilada]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/old-browsers-do-they-still-exist/</guid>
		<description><![CDATA[I&#8217;ve been thinking about this for a long time and while I thought I had a solid opinion on the matter, I find myself waffling on the issue. Who cares about older browsers? If you haven&#8217;t done so, I highly recommend cracking out a copy of Firefox 1. Start bouncing around to a few sites [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking about this for a long time and while I thought I had a solid opinion on the matter, I find myself waffling on the issue.</p>
<h2>Who cares about older browsers?</h2>
<p>If you haven&#8217;t done so, I highly recommend cracking out a copy of Firefox 1. Start bouncing around to a few sites and check out what&#8217;s broken. Sure, most stuff is fine but you&#8217;d probably be surprised at what&#8217;s broken. What about Firefox 2? I have more people using this old version of Firefox than I do of all Opera users put together. These are browsers that I don&#8217;t check my site in any more. In a way, it&#8217;s like they don&#8217;t even exist.</p>
<p>As web browsers have progressed, we&#8217;ve increasingly gotten to the point where we just ignore old browsers like they don&#8217;t exist. No more testing, no more hacks, no more nothing. Who knows what it looks like? Is it good, is it bad? Does it even matter?</p>
<h2>My initial stance</h2>
<p>My initial stance was that every browser mattered. It doesn&#8217;t matter if they&#8217;re coming in with Netspace 1.0 or Internet Explorer 3. These people are armed with a browser and they deserve content. No, they don&#8217;t get any CSS, or maybe a limited amount. Only the recent browsers get the good stuff.</p>
<p>We draw a line in the sand that says, &quot;You popular browsers, stand over here. Everybody else, just be happy you got content.&quot; </p>
<p>More specifically, a base style sheet would declare some default font styles but no float or other layout tricks. Just linear content. This default would look decent in any browser, no matter from what era. It makes a great print style sheet, too.</p>
<p>Then, for those cool, fancy browsers that we know and like, we give them the good stuff. The whole enchilada.</p>
<p>Two major issues here:</p>
<ol>
<li>How can you tell that you have a current browser?</li>
<li>What can you assume about browsers that haven&#8217;t come out yet?</li>
</ol>
<p>With Internet Explorer, it&#8217;s really easy: we have conditional comments that we can use to target specific versions. Now for the rest of them? Unfortunately, the best way (that I can think of) is to use user agent sniffing on the server to serve up the extra stylesheets only if the visitor has a browser within the subset that we find acceptable.</p>
<p>On that second point, what happens when a new version comes out? Or somebody says they&#8217;re &quot;compatible&quot; with another engine and your user agent sniffing serves up something limited. Basically, it becomes  difficult to future-proof something for any length of time. </p>
<h2>My softened stance</h2>
<p>My pragmatism comes into play, like that little devil and angel on my shoulders telling me each side of the story. The fact is, these <em>are</em>  old browsers. Why haven&#8217;t these people upgraded? Why are all these people still using Firefox 2? So what if it&#8217;s a little (or a lot) broken for them. They should upgrade.</p>
<p>Obviously, Internet Explorer 6 is the oddball here. She&#8217;s that awkward girl who doesn&#8217;t understand social cues and realize that the party is over. It&#8217;s the elephant in the room, as it were. Too big to ignore. But right! We <em>have</em> a way to target IE browsers by version. We can use our conditional comments to tailor for IE6 until it disappears. We can feed it the limited CSS and let everybody else get the fun stuff.</p>
<h2>Mmmmm, pie</h2>
<p>When it comes to market support, I&#8217;ve often looked at it as one big pie. You may say that Opera is too small to really care about. It&#8217;s only 2%. You don&#8217;t care about Firefox 2 users. It&#8217;s only 2%. You may not care about accessibility issues. It&#8217;s only 2%. Soon enough, you&#8217;ve whittled down your potential market to 90% of what it could have been. </p>
<p>Every site, whether it be for personal or professional reasons, needs to mark that line in the sand. If you&#8217;re running a content-heavy, large traffic site targetting a less than savvy crowd then maybe IE6 and FF2 support is critical. You want to capture as much of the market as you can. If you&#8217;re running a niche blog focused on tech issues then even IE6 might be safe to put on the ignore list.</p>
<p>But all the while, I&#8217;ll keep thinking about all those people I could be getting. Did they walk away with the best experience? Sometimes it hurts my head just to think about it. So now it&#8217;s your turn: Should we care about old browsers or fringe browsers? Or are we safe in our little bubble?</p>
<div>
<a href="http://feeds2.feedburner.com/~ff/snookca?a=DLZMXDJDwQg:akvgQecSAgQ:yIl2AUoC8zA"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d6c6e_snookca?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/snookca?a=DLZMXDJDwQg:akvgQecSAgQ:F7zBnMyn0Lo"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d6c6e_snookca?i=DLZMXDJDwQg:akvgQecSAgQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/snookca?a=DLZMXDJDwQg:akvgQecSAgQ:gIN9vFwOqvQ"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/db447_snookca?i=DLZMXDJDwQg:akvgQecSAgQ:gIN9vFwOqvQ" border="0"></img></a>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/db447_DLZMXDJDwQg" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/old-browsers-do-they-still-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling an Explicit-Width Bug in Internet Explorer</title>
		<link>http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/handling-an-explicit-width-bug-in-internet-explorer/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/handling-an-explicit-width-bug-in-internet-explorer/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 20:53:54 +0000</pubDate>
		<dc:creator>BlogPoster</dc:creator>
				<category><![CDATA[web resources]]></category>
		<category><![CDATA[bar charts]]></category>
		<category><![CDATA[collective memory]]></category>
		<category><![CDATA[combo charts]]></category>
		<category><![CDATA[dan wilkinson]]></category>
		<category><![CDATA[div elements]]></category>
		<category><![CDATA[header text]]></category>
		<category><![CDATA[relative position]]></category>
		<category><![CDATA[row headers]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[survey report]]></category>
		<category><![CDATA[table rows]]></category>
		<category><![CDATA[test page]]></category>
		<category><![CDATA[understandable reaction]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/handling-an-explicit-width-bug-in-internet-explorer/</guid>
		<description><![CDATA[In creating the combo-bar charts for the survey report, I stumbled into an Explorer bug that I didn&#8217;t remember ever seeing before, and Google didn&#8217;t turn up anything that seemed to be related. This could easily mean that I&#8217;m the only person who ever did something this insane and thus found the bug. It could [...]]]></description>
			<content:encoded><![CDATA[<p>
In creating the combo-bar charts for <a href="http://aneventapart.com/alasurvey2008">the survey report</a>, I stumbled into an Explorer bug that I didn&#8217;t remember ever seeing before, and Google didn&#8217;t turn up anything that seemed to be related.  This could easily mean that I&#8217;m the only person who ever did something this insane and thus found the bug.  It could just as easily mean that my Google-fu has failed.  Either way, I&#8217;ll write it up here so it can enter the collective memory.  (And surely someone has already noted that Google is positively Jungian?)
</p>
<p>
You can see both the problem and two workarounds on <a href="http://meyerweb.com/eric/css/tests/winie/table-double/testcase.html">this test page</a>.  In brief, the problem occurred when I had a table cell containing a paragraph with an explicit width set.  I did this through the <code>style</code> attribute, though tests show that for this bug, it doesn&#8217;t matter whether you use the attribute or assign it via a style sheet.  Around these explicit-width paragraphs were <code>div</code> elements with <code>width: 200%;</code>, for bar-drawing purposes (it&#8217;s a little complicated).  Everything was fine in 99% of cases.  But as soon as the header text at the beginning of the row went to two lines of text, the explicit-width paragraphs doubled in width.  What was <code>80.1%</code> wide would be drawn as though it were <code>160.2%</code> wide.
</p>
<p>
My hopefully understandable reaction was to say, &#8220;Whuh?&#8221;.  I threw a few hasLayout triggers at the offending paragraph (relative position, <code>zoom</code>, etc.) and got nowhere.  In the end I worked around the problem by telling IE6 and IE7 to not wrap text in the row headers of combo charts.  (The bug is not present in IE8.)
</p>
<p>
I mentioned all this in <a href="http://meyerweb.com/eric/thoughts/2009/04/07/findings-of-the-a-list-apart-survey-2008/">my announcement post</a>, and the ever-awesome <a href="http://wilkinsonweb.com/">Dan Wilkinson</a> <a href="http://meyerweb.com/eric/thoughts/2009/04/07/findings-of-the-a-list-apart-survey-2008/#comment-454002">discovered</a> that the problem could be fixed by setting all of the table rows to, say, <code>height: 3em</code>.  Armed with that breakthrough, I experimented a little more and found that I could actually set the offending table row&#8217;s height to <code>2.75em</code> and still have things work as intended.  Below that and the paragraph widths doubled.
</p>
<p>
Then I lowered the <code>line-height</code> of the headers to <code>1</code> and found that I could take the overall row&#8217;s height as low as <code>2.33em</code> before triggering the bug.  And that&#8217;s when it dawned: the bug was triggered by the layout height of the header cell&#8217;s content being taller than the content of the cell containing the paragraph, <em>and</em> not explicitly declaring styles that would make the data cell as tall as or taller than the height needed to have the header cell contain its content.
</p>
<p>
Okay, that&#8217;s a little dense.  Let me step through the symptoms and two found workarounds to see if that clears it up:
</p>
<ol>
<li>The data cell always had a single line of text.  The bug was triggered by having the header cell go to two lines of text, whereas it was not if the header cell had a single line of text.</li>
<li>If the row&#8217;s height is explicitly set to a value equal to or greater than the header cell&#8217;s content, the bug is not triggered.</li>
<li>Alternatively, if the height of the data cell is set or fored to be equal to or greater than the height of the header cell, the bug is not triggered.  This can be done with an explicit <code>height</code> or with added top and bottom padding or by adding top and bottom margins to the paragraphs in the cell.</li>
</ol>
<p>
Some side tests I did indicate that the header cell is <em>not</em> needed to trigger the bug.  In other words, the problem could happen even if there are only data cells in the row.  Furthermore, I found that the width-scaling was directly affected by the <code>width</code> of the wrapping <code>div</code>, and thus the widths were doubling only because I had the <code>div</code>&#8217;s <code>width</code> set to <code>200%</code>.  If I set it to <code>150%</code> instead of <code>200%</code>, then the paragraphs only got half again as wide instead of doubling.  That seems to make sense until you see it in action.  When I say the paragraphs got half again as wide, I mean that instead of being 75% as wide as the <code>div</code>, they were 112.5% as wide as the <code>div</code>.  If I set the <code>div</code>&#8217;s <code>width</code> to <code>200%</code>, then they were 150% the width of the <code>div</code>.
</p>
<p>
So.  As I say, this bug does not affect IE8, so that&#8217;s good, and it can be worked around in IE6 and IE7, which is even better.  The problem would be if you didn&#8217;t know how tall your cells might get&#8212;in my case, I can be (reasonably) sure that the tallest a cell&#8217;s content will ever get is two lines of text, and by setting an explicit <code>line-height</code> on the headers I can know how tall I have to make the rows in order to avoid the bug.
</p>
<p>
Another day, another workaround!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/blogposter/web-resources/handling-an-explicit-width-bug-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

