Aug
07
2005

Bow to me, IE

That Damn Menu Problem - Fixed

Sunday, August 7, 2005 - 07:23:20 pm
(Posted Under: Development)
Finally!

The Windows Classic theme for my website has been the bain of my existance since I first redesigned the website in September 2004. Well, not the theme per se - the bain of my existance has been Internet Explorer, and it's pathetic CSS support - in particular, when it comes to the menu bar.

For the menu navigatiom I use the Suckerfish approach. (Suckerfish is documented on A List Apart Suckerfish Dropdowns.) Basically the Suckerfish code, with my own adaptation - in my opinion, more manable code than the original, and supporting multi sub menus.

Suckerfish is the bomb, because it's a pure CSS (Cascading Style Sheets), is very accessible and has no messy DHTML or such - with a catch - it doesn't work as pure CSS in Internet Explorer - it does need a bit of Javascript to help the crappy browser along. You write a song about a porn star, fine.

However, my adaptation changed some (a lot? it was over a year ago, I don't remember) to make a great deal of use of CSS selectors, which in my opinnion has made the CSS much nicer. In Gecko based browsers (Firefox, Netscape) anyway. Of course, Internet Explorer, the piece of crap that it is, doesn't handle CSS selectors properly (if at all?).

Hence this theme has shown up perfectly in Netscape / Firefox, and always looked like a piece of shit in Internet Explorer. Most painful when I was overseas, and had people actually looking at the site, most certainly in IE.

It's been something I've wanted to fix for the longest time. I actually wrote some CSS that made it work in IE, however if Gecko rendering engines saw the code, the meny would break in those browsers. Eh! I could have done something server side to check the browser and send different CSS appropriately, but I wanted to stay away from that.

Finally today I've devised a method to make the menu work in both browsers, without going server side hacks. Basically, and why I didn't think of this months ago, I do not know, taping into the existing IE javascript helper code to tag elements under IE, and use those to tweak the CSS Internet Explorer uses. All the while Gecko based browsers completely ignore the Internet Explorer CSS hacks.

This has been pissing me off for 11 months! It's so good to finally have it fixed! The drop down menus are very touchy in Internet Explorer (hardly what you could call 'accessible' actually), but finally I have it at least working in both browsers. Color me quite satistied!

Post Comment



All fields are required. Email addresses will not be published, but are required for anti-spam purposas.

Switch Styles

About Style Switching.

!Weblog Index

Jul August 2005 Sep
SU MO TU WE TH FR SA
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Categories

RSS FeedRSS Feed