Annoyances: IE CSS, Firefox XSL
geoffoliver - December 22, 2007
Today I get to complain about *two* browser annoyances :-) First, the IE problem, just because it pisses me off the most...
Here's something I discovered a few days ago. If you set a width on a select box in CSS (style="width: ##px;") and you have an option with text that is wider than the ##px, the text in the "option" tags gets chopped off. In fact, the "option" tags only display as wide as the ##px width you've set. This problem is only in Internet Explorer, of course. Safari and Firefox seem to do what you would expect and show you *all* the text, unless you set a width on the "option" tags, then the text gets cropped. However, IE doesn't respect widths on an "option" tag, so there's no fix AFAIK. Pretty damned annoying, especially when the client needs a select box set to a hard width to fit inside something else. I wasn't able to figure out a solution and it seems to be a
well known problem with no fix. Oh well. Maybe in IE8. HAH.
Second, we have Firefox pissing me off... So, I wanted to put together a site that used
XSL to render the pages, mainly for kicks and so I can play with/learn XSL, but, also so content could be easy to edit and not have to worry about someone mucking up the framework of the site. Unfortunately, Firefox (2.0) has a problem with HTML being parsed from an XML into the XSL. IE and Safari both display the HTML with no issues, but Firefox escapes everything, so all you see is code. Even with "disable-output-escaping='yes'" I still get escaped characters. This seems to be
known by the developers but there's no plan to fix it. There's a
hacky way to fix it, but it uses javascript to set the values if it detects mozilla... Meh, whatever. It took about an hour to write a little controller to suck out the content from files somewhere and put them where they belong on a template. Also takes that load off the client :-)