I’ve been “battling” with IE for more than 3 years now and I just felt that it’s finally time to not only bash the poor
beloved browser and instead pay homage to the good things that it was able to instill on me.
There is no such thing as one tweak fix all
If there’s such a thing, the guy (or girl) who was able to find that tweak would’ve been a bajillionaire by now. That or he/she’s
, unfortunately probably a Microsoft employee by now.
Patience is a virtue (and a very important skill)
There was a time before when I was able to “fix” a specific IE bug in one of my dreams. I can’t remember what that bug was though, but I’m sure that happened, because that also happened when I was trying to play with WordPress before.
Anyway, I think IE is a great therapy for people who need to manage their angers. I used to be very explosive when I’m angry or when I can’t find a solution to a problematic rendering error. Sure, you can say that I matured a little but I think that if IE’s following my every whim all the time, then I don’t think I would be used to seeing any design screwed up in the
blasted beloved browser.
If it fixed your problem…
Chances are that it opened a LOT of seemingly unrelated problems waiting to be discovered. I fixed a height problem and the next thing I know, the other elements (who are important at that!) are not showing up anymore. So be wary, be very, very wary about that hacks and fixes.
With IE, anything is possible
I honestly have a feeling that the Murphy’s Law was created with IE in mind, no kidding! If you think that there’s no way that any element will collapse specially if you already specified its width and height, then expect IE to crush that belief of yours.
If you’re dealing with IE, it’s OK to be paranoid
And check, and check, and check. There was a time when an office mate and I was checking the same site in IE, just different machines and it’s rendering differently. Seriously.
If your element collapsed in IE, chances are that it doesn’t have a
And that usually means you need to add a
width to your element and if that still did not work, add an
overflow:hidden. Sometimes that still won’t work so you have to add a
display:block. That usually does the trick. If you don’t want to add a specific height however, you can add
100% as its value, anything as long as it’s not
auto or a pixel or
em. Be careful though, if you add a height to its parent div, it’ll take the height of its parent.
I could never stress this enough —
haslayout is everything in IE
If your element is inline, then it’s fine, but if it’s a block-level element we’re talking about, grab the IE dev toolbar and hunt for that ever-elusive
Sidenote: Want to run 2 IE in the same machine? Download IE 6 and then download a copy of IE 7 standalone, yes, it’s necessary that it’s in that order and not the other way around because last time I had IE 7 as my default browser and got the IE 6 standalone, IE dev toolbar no longer worked which is one of the things that enabled me to keep my sanity back then.
Before using an IE hack, check out if you can solve the problem without it.
Yes, even if it drives you insane. It’s daunting, it’s scary, but it’s to be done. I hate to look at an IE6 specific stylesheet that contains more or less 100 lines of code. If it’s a problem with margins, try to see if the changes you need to do will make such a big impact to the other browsers, if it’s hardly noticeable then apply the fix in your main stylesheet. Now if we’re talking about 20-25 pixels (or more) difference then by all means, do it in a separate stylesheet.
IE6 doesn’t want <tr> to have borders
It’s annoying when I realized that. I thought the problem was that the table doesn’t have
haslayout (how can a table not have a haslayout when it’s a block-level element by default, yes?!) that’s why the borders won’t show up. Turns out that IE doesn’t render a border when it’s in the
<tr> tag, you have to add the border in the
<td> tag and don’t forget to add
border-collapse:collapse for your
table so that the border will look continuous.
Test again and again and again
I told this to you before, remember? You can never be too sure with IE so you must be paranoid. You must be an OC and you must never forget to expect the worst case scenarios.
So there! What IE taught me so far, anyone else want to throw in some ideas too?
One unrelated musing, do you know that I just finally realized that this sign < stands for less than and > stands for greater than. It’s stupid, I know but it’s true! And guess what finally taught me this very “complicated” mathematical symbol.