<?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</title>
	<atom:link href="http://nerd.vasilis.nl/category/html/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>Design for users first, not just for good looks</title>
		<link>http://nerd.vasilis.nl/design-for-users-first-not-just-for-good-looks/</link>
		<comments>http://nerd.vasilis.nl/design-for-users-first-not-just-for-good-looks/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 13:02:04 +0000</pubDate>
		<dc:creator>Vasilis</dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://nerd.vasilis.nl/?p=138</guid>
		<description><![CDATA[I&#8217;m beta testing a new real time analytics app and it looks absolutely beautiful. A subtle design, a clear navigation, nice looking forms and some clever looking scrolling effects which remind me of framesets, just better looking. So far so good. I bookmarked it, imported the url into iCab on my iPad (my favorite browser [...]<p><a href="http://nerd.vasilis.nl/design-for-users-first-not-just-for-good-looks/">Design for users first, not just for good looks</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m beta testing a new real time analytics app and it looks absolutely beautiful. A subtle design, a clear navigation, nice looking forms and some clever looking scrolling effects which remind me of framesets, just better looking. So far so good. I bookmarked it, imported the url into iCab on my iPad (my favorite browser for managing online apps) and logged in to change the settings while lying on the couch. This is where the happy part ends. I really tried to make this a positive article but I just couldn&#8217;t. Sorry.</p>
<p><span id="more-138"></span></p>
<p>It turns out that some input types are somehow replaced by images and the text you enter on your keyboard is added to a div with a script. Since no input element gets focus the keyboard on touch devices will not be visible and at least on my iPad you cannot even paste text. Maybe you could write another very complex script to emulate this behaviour but, less silly, why wouldn&#8217;t you just use some regular input types instead. You can actually style those using css, you really don&#8217;t need any images to do that.</p>
<p>Same with scrolling. All browsers on all devices since the early nineties can scroll a page, why would you want to write a script to emulate scrolling? This whole script is probably only there to be able to style the scrollbar and make it look the same in all browsers. The unfortunate side effect is that scrolling doesn&#8217;t work anymore on my touch devices. Now another complex script needs to be written in order to solve this issue, an issue that really shouldn&#8217;t exist in the first place.  Really, nobody will complain if a scrollbar looks exactly the same as it does on every single page on the internet. But people will complain if they see something that resembles a scrollbar but doesn&#8217;t do anything.  </p>
<p>The advice here is very simple: don&#8217;t try to fix things that work, you&#8217;ll break it.</p>
<p>I won&#8217;t complain about the silly loading bar you get to see for ten seconds before you get to see the actual data although I just cannot understand why it has to take that long. And I should complain about the incredible messy HTML, an unbelievable pile of inline style cruft, but I wouldn&#8217;t know where to start, this just looks like some sort of randomly generated vomit. I should definitely complain about the fact that I cannot use this site with my keyboard instead (or alongside with) my mouse but I already wasted enough time on this app. I surely should complain about the fact that the simple data the app provides is not accessible when JavaScript is turned of. </p>
<p>This app is actually so bad that I won&#8217;t link to it. (And i will never link to the crazy Web Framework that generated this dump and is responsible for some of these nice looking cruft machines that pop up all over the place. Please drink espresso, build grown up websites and leave the milk for the babies).</p>
<p><a href="http://nerd.vasilis.nl/design-for-users-first-not-just-for-good-looks/">Design for users first, not just for good looks</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.vasilis.nl/design-for-users-first-not-just-for-good-looks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display everything</title>
		<link>http://nerd.vasilis.nl/display-everything/</link>
		<comments>http://nerd.vasilis.nl/display-everything/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 18:45:08 +0000</pubDate>
		<dc:creator>Vasilis</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[nerd]]></category>

		<guid isPermaLink="false">http://nerd.vasilis.nl/?p=82</guid>
		<description><![CDATA[I just discovered a nice feature for minimalist frontend developers. You can use all elements with content for styling simply by using * {display:block;} Or display inline, or table-cell or whatever. All elements, including title, style and head can be used for styling now. Have fun with it! (I have only tested this on FF3.5 [...]<p><a href="http://nerd.vasilis.nl/display-everything/">Display everything</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I just discovered a nice feature for minimalist frontend developers. You can use all elements with content for styling simply by using</p>
<p>* {display:block;}</p>
<p>Or display inline, or table-cell or whatever. All elements, including title, style and head can be used for styling now. <a href="http://nerd.vasilis.nl/code/display-everything/">Have fun with it</a>!</p>
<p>(I have only tested this on FF3.5 and Safari. I guess it works on more browsers).</p>
<p><a href="http://nerd.vasilis.nl/display-everything/">Display everything</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.vasilis.nl/display-everything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centered images in the middle of a block without (total) loss of usability</title>
		<link>http://nerd.vasilis.nl/centered-images-in-the-middle-of-a-block-without-loss-of-usability/</link>
		<comments>http://nerd.vasilis.nl/centered-images-in-the-middle-of-a-block-without-loss-of-usability/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 20:40:36 +0000</pubDate>
		<dc:creator>Vasilis</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[nerd]]></category>

		<guid isPermaLink="false">http://nerd.vasilis.nl/?p=73</guid>
		<description><![CDATA[The designer wants all images to be centered inside a square box with defined dimensions. The longest side of each image is the same length as this dimension but the smaller side is unknown and variable. Easy you say. &#60;div style=&#8221;background:url(path/to/image-w100xh75.jpg) no-repeat 50% 50%;width:100px;height:100px;&#8221;>&#60;/div> Easy it is. Unless the usability expert comes knocking on your [...]<p><a href="http://nerd.vasilis.nl/centered-images-in-the-middle-of-a-block-without-loss-of-usability/">Centered images in the middle of a block without (total) loss of usability</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The designer wants all images to be centered inside a square box with defined dimensions. The longest side of each image is the same length as this dimension but the smaller side is unknown and variable. Easy you say. </p>
<p>&lt;div style=&#8221;background:url(path/to/image-w100xh75.jpg) no-repeat 50% 50%;width:100px;height:100px;&#8221;>&lt;/div></p>
<p>Easy it is. Unless the usability expert comes knocking on your door. Background images don&#8217;t behave the same as normal images. In most browsers, for instance, you can&#8217;t easily download a background image by right clicking on it. </p>
<p>So you do want the background positioning but you also want some important behaviour of a normal image. Here it is: <a href="http://nerd.vasilis.nl/code/centered-middled-images/index.html">Centered images in the middle of a block with normal usability</a>.</p>
<p>It does not work in fluid or flexible layouts of course. But it does work in all serious browsers and in IE7. Haven&#8217;t tested it in IE6 but there&#8217;s no reason it wouldn&#8217;t work there. I&#8217;m not sure if it creates a performance issue. The images are downloaded only one time, so that&#8217;s not an issue. The only problem might be double memory usage. I haven&#8217;t tested that.</p>
<p><a href="http://nerd.vasilis.nl/centered-images-in-the-middle-of-a-block-without-loss-of-usability/">Centered images in the middle of a block without (total) loss of usability</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.vasilis.nl/centered-images-in-the-middle-of-a-block-without-loss-of-usability/feed/</wfw:commentRss>
		<slash:comments>3</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>Using position:absolute to avoid inline styles</title>
		<link>http://nerd.vasilis.nl/using-position-absolute-to-avoid-inline-styles/</link>
		<comments>http://nerd.vasilis.nl/using-position-absolute-to-avoid-inline-styles/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 20:25:48 +0000</pubDate>
		<dc:creator>Vasilis</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[nerd]]></category>

		<guid isPermaLink="false">http://nerd.vasilis.nl/?p=38</guid>
		<description><![CDATA[A few weeks ago I upgraded an old Pivot weblog to the latest version of WordPress, a weblog system which is a bit more flexible, I think. One of the things I dislike though is some of the HTML that comes out of it&#8217;s core functions. For example an image with a caption. The known [...]<p><a href="http://nerd.vasilis.nl/using-position-absolute-to-avoid-inline-styles/">Using position:absolute to avoid inline styles</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I upgraded an old Pivot weblog to the latest version of WordPress, a weblog system which is a bit more flexible, I think. One of the things I dislike though is some of the HTML that comes out of it&#8217;s core functions. For example an image with a caption.</p>
<p>The known problem with an image with a caption below it is that it is impossible to make the text as wide as the image without setting the width of the image on the caption.<br />
<span id="more-38"></span></p>
<pre><code>&lt;div class="image-with-caption">
 &lt;img src="image.jpg" alt="">
 &lt;p>This is a caption below an image and the caption ignores the width of the image.&lt;/p>
&lt;/div></code></pre>
<p>The above code will look something like this:</p>
<pre>---------------------------
|                         |
|                         |
|                         |
|                         |
|                         |
|                         |
|                         |
|                         |
---------------------------
This is a caption below an image and the caption ignores the width of the image.</pre>
<p>But we want it to look like this:</p>
<pre>---------------------------
|                         |
|                         |
|                         |
|                         |
|                         |
|                         |
|                         |
|                         |
---------------------------
This is a caption below an
image and the caption  is
as wide as the image.</pre>
<p>This can be done by adding inline styles to the surrounding div (or to the caption itself).</p>
<pre><code>&lt;div class="image-with-caption" width="270px">
 &lt;img src="image.jpg" alt="">
 &lt;p>This is a caption below an image and the caption is as wide as the image.&lt;/p>
&lt;/div></code></pre>
<p>I don&#8217;t like inline styles. So there must be another way to set the width of the caption. Hello position:absolute!</p>
<pre><code>.image-with-caption {
	float: left; /* we want this */
	position: relative; /* we need this */
}

.image-with-caption img {
	display: block; /* we don't need this but it solves things */
}

.image-with-caption p {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0; /* this will make it as wide as the image */
}</code></pre>
<p>The above CSS will render our HTML as follows:</p>
<pre>---------------------------
|                         |
|                         |
|                         |
|                         |
|                         |
|The caption is now placed|
|over the image, aligning |
|at the bottom            |
---------------------------</pre>
<p>You can now decide to only show the caption <a href="http://vasilis.nl/tets/no-width-caption/" title="Or something like that">when hovering over the image</a>. Or you could add a margin below the image of two or three times  the default line-height in order to fit the text below the image. </p>
<p>I know, I know, it is not the same as a flexible caption (flexible in height) below an image, and I sure know it can well result in unreadable and unaccessible text when the caption is very long (or the image is very small). And the photographer won&#8217;t be happy with text over his image and the copywriter won;t like his caption to be hidden. I just don&#8217;t like inline styles. And I love the power of position:absolute</p>
<p>P.S. Yes, I know there is a browser out there called IE6. If you understood what I wrote you can make up a fix. If you didn&#8217;t don&#8217;t use position:absolute.</p>
<p><a href="http://nerd.vasilis.nl/using-position-absolute-to-avoid-inline-styles/">Using position:absolute to avoid inline styles</a> is a post from: <a href="http://nerd.vasilis.nl">Nerd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.vasilis.nl/using-position-absolute-to-avoid-inline-styles/feed/</wfw:commentRss>
		<slash:comments>0</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>

