02 Jul 08 I just wasted my day.
A “day” being a relative term here. I slept to 12pm.
The whole day I was trying to iron out IE discrepancy issues regarding to stlying (ala CSS). I found out lots of new things! 1) Microsoft made a broken browser that ships with Windows XP. 2) I now know precisely what DOCTYPES are. 3) I found out stuff about the box model. 4) I found some CSS hacks to make IE6 versions of my site much better! 5) When something doesn’t work there is a really good reason for it!
1)
It sucks that IE6 shipped with XP. This means there are loads of people out there who won’t bother to update their browser and when faced my (IE broken) site, just run away like an intrepid WoW adventurer when faced a bunch of murlocs.
2)
I never quite knew what DOCTYPES were and what they were used for. IT seems that DOCTYPES are especially useful for instances like this where I can alter how the browser interprets CSS code. Thus now all my doctypes are set to strict mode so that IE6 properly interprets the box model.
3)
Box model. The box model is the way <div> blocks are shown in browsers (ie width, padding and margins). Firefox does it right according to W3C (the guys at the head of the world controlling the world wide web’s standards. okay not THAT dramatic), but IE does not.
4)
I found a wonderful CSS hack (thanks to someone. can’t remember the site) for IE6 browsers! IE6 can’t interpret the following tag “body>div #container”. In Firefox and future IE browsers, it simply overrides the previous version of #container.
5)
The greatest problem today that I faced wasn’t really any of the above. I kept fiddling everywhere in the CSS and HTML. It just didn’t want to work, until I accidentally stumbled upon the answer 3 hours later. I overwrote most of the CSS tags I was using in an old CSS file that I forgot to delete! I was furiously changing elements, but it just didn’t want to change (simple things like width). I thought it was just my amateur knowledge that was causing it to break. Blegh. So I wasted my day, by just being stupid. >_<







On the plus side IE6 is [slowly] dying - it currently only has somewhere in the region of 25% market share (reliable sources are hard to find), and with IE8 hopefully only a few months away its death will be sped up a bit.
As an aside, you can also use conditional comments (in html) to make markup only apply to IE6:
/* Add CSS here */
Sorry, forgot that the html would be interpreted. Check the source - hopefully it’ll be there.