Looking Back

Friday, April 2, 2004

Who knew order matters?

If you visited yesterday, you probably saw an incomprehensible jumble of a web site. It wasn’t me speaking in tongues—it was a little April Fool’s CSS fun. Here’s what I added to my stylesheet:

* { direction: rtl; unicode-bidi: bidi-override; }

*:hover { direction: ltr; unicode-bidi: normal; }

The asterisk indicates the rules apply to all elements. The direction: rtl rule is intended for languages that read read right to left, like Hebrew. The unicode-bidi: bidi-override rule tells the browser, “Ignore everything else you know about this language, and just follow the direction rule.”

You probably discovered that hovering your mouse over any text would cause it to turn back normal. What, you say that didn’t work for you? I’m sorry, you must be using a non-standard browser. May I suggest an alternative?