<?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>Nerd &#187; html 5</title>
	<atom:link href="http://nerd.vasilis.nl/category/html-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://nerd.vasilis.nl</link>
	<description>Vasilis van Gemert</description>
	<lastBuildDate>Mon, 09 May 2011 07:51:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Another HTML5 fallback strategy for IE</title>
		<link>http://nerd.vasilis.nl/another-html5-fallback-strategy-for-ie/</link>
		<comments>http://nerd.vasilis.nl/another-html5-fallback-strategy-for-ie/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 20:57:34 +0000</pubDate>
		<dc:creator>Vasilis</dc:creator>
				<category><![CDATA[html 5]]></category>
		<category><![CDATA[nerd]]></category>

		<guid isPermaLink="false">http://nerd.vasilis.nl/?p=140</guid>
		<description><![CDATA[Versions of Internet Explorer prior to number 9 can not style unknown elements without the help of JavaScript: by adding the unknown elements to the DOM you can style them like any other element. So if you want to use the new HTML5 elements you will need JavaScript to style your site. Most people will [...]<p><a href="http://nerd.vasilis.nl/another-html5-fallback-strategy-for-ie/">Another HTML5 fallback strategy for IE</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Versions of Internet Explorer prior to number 9 can not style unknown elements without the help of JavaScript: by adding the unknown elements to the DOM you can style them like any other element. So if you want to use the new HTML5 elements you will need JavaScript to style your site. Most people will have no problem seeing your site but for those unlucky visitors with IE and JavaScript disabled (for whatever reason, there are lots of them), the experience can be horrible. Here&#8217;s a simple solution:</p>
<p>Serve your default stylesheet to all browsers except IE8 and lower. To those &#8220;browsers&#8221; you serve Andy Clarke&#8217;s <a href="http://code.google.com/p/universal-ie6-css/">universal ie6 css</a> in a conditional comment. Then with the help of a simple javascript you immediately replace this css file with your default css file. Now those unlucky visitors will at least see a nicely styled easy to read minimal site. (View source on <a href="http://vasilis.nl/delicious/">this page</a> to see how it works)</p>
<p>I couldn&#8217;t think of a way to replace the fallback css before it gets loaded so the only negative side effect of this technique is that it uses an extra http request. I think it&#8217;s worth it: for me this JavaScript dependency was the only thing that kept me from using HTML5 elements.</p>
<p><a href="http://nerd.vasilis.nl/another-html5-fallback-strategy-for-ie/">Another HTML5 fallback strategy for IE</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.vasilis.nl/another-html5-fallback-strategy-for-ie/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Equal height boxes with flexible widths</title>
		<link>http://nerd.vasilis.nl/equal-height-boxes-with-flexible-widths/</link>
		<comments>http://nerd.vasilis.nl/equal-height-boxes-with-flexible-widths/#comments</comments>
		<pubDate>Thu, 14 May 2009 20:52:30 +0000</pubDate>
		<dc:creator>Vasilis</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html 5]]></category>
		<category><![CDATA[nerd]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://nerd.vasilis.nl/?p=66</guid>
		<description><![CDATA[My design buddies @work came up with one of the most complex layouts I ever had to build. You could desribe it as an elastic layout with boxes with a flexible width which should have the same height as it&#8217;s siblings. With rounded corners and dropshadows offcourse. But that would be too easy a description. [...]<p><a href="http://nerd.vasilis.nl/equal-height-boxes-with-flexible-widths/">Equal height boxes with flexible widths</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></description>
			<content:encoded><![CDATA[<p>My design buddies @work came up with one of the most complex layouts I ever had to build. You could desribe it as an elastic layout with boxes with a flexible width which should have the same height as it&#8217;s siblings. With rounded corners and dropshadows offcourse. But that would be too easy a description. There are templates with 2, 3 and 4 boxes next to each other and these boxes can be contained within containers with different widths. A cynic would ask me why I didn&#8217;t use tables and he would be right. It might have saved me a lot a hassle. But forget about tables.</p>
<p><span id="more-66"></span></p>
<p>One way to build a layout like this is to measure all possible box-sizes to the pixel, create all background-images for these boxes (a few hundred in this extreme case) and start writing a CSS file of a few thousand lines. I chose to see if there&#8217;s another way to do this, with less code and much less images (one). And here I present this other way.</p>
<p>Equal height cols with a flexible width</p>
<p>Basically what this technique comes down to is to place an absolutely positioned div inside a <em>statically positioned floating div</em> which is inside a <em>relatively positioned div</em> with overflow set to auto. The absolutely positioned div can inherit the left position and the width of its direct parent, but if you define its top and its bottom it will, off course, inherit these from the containing, relatively positioned div. And this relatively positioned div will get its height from the highest statically positioned floating div. Why didn&#8217;t you think of this before? (-:</p>
<p>Check out these examples</p>
<ol>
<li><a href="http://nerd.vasilis.nl/code/ehc/equal-height-col-01.html">Equal height cols with a flexible width</a>
<li><a href="http://nerd.vasilis.nl/code/ehc/equal-height-col-02.html">Equal height cols with a flexible width, a border and padding between the boxes</a>
<li><a href="http://nerd.vasilis.nl/code/ehc/equal-height-col-03.html">Equal height cols with a flexible width, padding between the boxes, rounded corners, dropshadows and flexible background-colors</a>
</ol>
<p>IE6 needs JavaScript. I didn&#8217;t bother to include it here. Opera needs an update in order to display this correctly, I filed a bugreport. IE7 has difficulties with percentages.</p>
<p><a href="http://nerd.vasilis.nl/equal-height-boxes-with-flexible-widths/">Equal height boxes with flexible widths</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.vasilis.nl/equal-height-boxes-with-flexible-widths/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>HTML 5</title>
		<link>http://nerd.vasilis.nl/html-5/</link>
		<comments>http://nerd.vasilis.nl/html-5/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 22:03:57 +0000</pubDate>
		<dc:creator>Vasilis</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[html 5]]></category>
		<category><![CDATA[nerd]]></category>

		<guid isPermaLink="false">http://nerd.vasilis.nl/?p=26</guid>
		<description><![CDATA[I switched to HTML 5. A nerd blog should have a nerdy doctype. There&#8217;s not much to say about it. I replaced the first div in the old HTML with a new element called header, I replaced the following divs which are direct children of the body with the new element section, I replaced the [...]<p><a href="http://nerd.vasilis.nl/html-5/">HTML 5</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I switched to HTML 5. A nerd blog should have a nerdy doctype. There&#8217;s not much to say about it. I replaced the first <em>div</em> in the old HTML with a new element called <em>header</em>, I replaced the following <em>div</em>s which are direct children of the <em>body</em> with the new element <em>section</em>, I replaced the <em>div</em> that was a child of the <em>section</em> with the element <em>article</em> and replaced the last <em>div</em> of the page with the element <em>nav</em>. I could have chosen the element <em>footer</em>, but I think <em>nav</em> describes its purpose better. I don&#8217;t have an <em>aside</em> so I don&#8217;t need that element.</p>
<p><span id="more-26"></span></p>
<p>There are some very nice new attributes and attribute values I use on form elements that actually work in Opera. I used the <em>required</em> attibute, the <em>type=&#8221;email&#8221;</em> and the <em>type=&#8221;url&#8221;</em>. These form a efficient (but very ugly and unstyleable) client side form validation. Nice to have!</p>
<p>The best part of HTML 5 is that you will be able to remember every part of the HTML, even nerdy stuff like the doctype declaration. &lt;!DOCTYPE html> is easy to remember. Just like &lt;meta charset=&#8221;utf-8&#8243;>. So no more code searching and copypasting.</p>
<p>I left out the <em>html</em>, <em>head</em> and the <em>body</em> tags, browsers will put them where they are needed anyway, just like the <em>tbody</em> of a table. </p>
<p>You can&#8217;t use the W3C Validator for HTML like this, you&#8217;ll need the incredible <a href="http://validator.nu/">validator.nu</a>.</p>
<p>One thing to remember when starting to style your new HTML is to add display:block; to every new element like <em>section</em>. That&#8217;ll save you time. I&#8217;ll write about the CSS I wrote in a next post.</p>
<p><a href="http://nerd.vasilis.nl/html-5/">HTML 5</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.vasilis.nl/html-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

