Interesting Mozilla Behaviour

By Oli
At 7:01 PM · Saturday, 15 November · 2003
To CSS · Coding · HTML · Weblogging

Rudolf Ammann of Tawawa.org recently told me about how ugly this website was in Mozilla 1.4/PC (thanks!). On his computer, all text (apart from the pretentious tagline) were italic, and all elements had a dotted bottom border. For nested elements this could be three or four borders (!). It was, he said, hard to read ;-)

Thanks to his help (I lack a PC to test on), I’ve tracked the problem down to one line of CSS code:

*:lang(ja) {font-style: italic; border-bottom: 1px #999 dotted; cursor: help;}

This is supposed to highlight any element (*) which has a lang attribute set to jp (Japanese). This should only be in-line spans that contain Japanese, for example baka・(バカ). For some reason I hadn’t set a language in the html tag, and because my charset is utf-8 there’s no language implied there either. So it appears that Mozilla decided all my pages were Japanese based on a little-used tag in my CSS. Of course, UTF-8 doesn’t mean English, but I’m amazed that a CSS tag affected this.

Language tags are now in place, and that problem is resolved. Thanks Rudolf! Now I might look at his extensive list of other complaints ;-) Or even my own.

Discussion...

Comments (1) · TrackBacks (0)  to  http://www.boblet.net/cgi-bin/mttb-external.cgi/39
1. Comment by Rudolf  · 15 Nov, 2003 · 8:42 PM

Oli meet Michael, Michael meet Oli

CSS geeks are one scary bunch.