Now using a blog

This should be more convenient to read and (for me) to publish – all content will be migrated to wordpress the next days. First at all the theme needs to be updated.

CSS selector according to language

To handle multiple languages on one page, it’s best practice to use the lang(xml:lang)-tag. These can be selected via CSS. (Doesn’t work in IE 6, of course.)
<code lang="html">
<span lang="en" xml:lang="en">this is english..</span>
<span lang="en" xml:lang="de">hier ist deutsche Texte..…</span>
</code>

<code lang="css">
p[lang="de"] { color: green; /* whatever */}
p[lang="en"] { color: red; /* whatever */}
</code>

Safari and friend IE

The same page viewed with Safari (Mac), IE 7 and IE 6 – for IE 6 the css hacks used have been disabled to see everything in its full glory. Notice the interesting placement of the right box.

Click on an image and use the arrow keys to flip through:

XHTML 1.0 valid + href target

“href target” is not XHTML 1.0 valid but very useful. With mootools adding the target-property afterwards is very easy:
window.addEvent('domready', function(){
  if ($$('a.external').length > 0) {
    $$('a.external').each(function(element, i) {
      element.setProperty('target', '_blank');
    });
  }
}