Stephen’s Statements A little bit of everything from Stephen Duncan Jr, a Software Developer in Portland, Oregon

Tuesday, August 24, 2004

Fixed Style-Sheet for IE

After a bit of looking and playing for another method, I decided to give up and use my first CSS-hack for IE. Ugh. Basically, IE doesn't support position: fixed, so instead of falling back to position: absolute, it falls back to position:static, placing my navigation bar at the bottom of the page, as that's where it falls in the source.

IE also doesn't understand the child selector: >. So, I changed the style on the navigation section to use position:absolute, then I add another style rule that IE doesn't understand to add position:fixed back:

body > #navigation_section { position: fixed;}

It's unfortunate to have to resort to such hacks, but it gets the job done. And now my site looks decent in IE, and exactly how I like it in Firefox. Opera still has an issue, but it's clearly a bug: if you zoom-out and zoom back in, the page will display correctly. If anybody wants to check out how my site looks in Safari or Konqueror, I'd appreciate it (I haven't got my Linux box hooked up, and won't for a while).