Speaking of Hacks… IE, UGH!

Maaaa! Internet Explorers messing up my design again!

God what a pain in the butt it is to get everything looking nicely in all browsers. Internet Explorer is THE WORST. If you ever find Internet explorer messing up your design, read this post cuz this hack is ultra painless…

Here’s the hack.

_

end of post.

Na, just messin. But it is! a simple underscore can save your design problems for good. I must warn you though, it really is a hack, it’s not valid css, but if you’ve tried everything else and you still cant get IE to work… it can save your brain from frustration. Seriously! I spent THREE days trying to get a pull down menu working in IE. Until I found the hack… Here’s a ridiculously simple example:

Problem.
I want the headline on ONE line. Looks GREAT in firefox at 26 pixels, bold, arial, red. Check IE. ugh, of course, doesn’t fit. It’s pushing it down to the next line. I want 26px arial dammit at least in ONE browser, and I’M NOT changing my entire layout.

Guess what, I can say, screw you Internet Explorer! make it 25px and leave my layout out of this!!! Now it fits in both browsers. Firefox and IE.

Heres the css:

.headline {
font-family: Arial, Helvetica, sans-serif;
font-size: 26px;
_font-size: 25px;
color: #CC0000;
font-weight: bold;}
}

Done. Done. and Done.
I just repeated the font size in my headline style, added an underscore and changed the size. This is what I needed for most of my IE css problems, especially for wordpress where div widths dont want to do at all what you tell them to. So my problem is fixed. Yay me!!!!! but i had a little help…

CaveMonkey explains ALL about IE hacks and different things you can do. Check it out!

Happy Hacking!

Like This Post? Share it.
  • Digg
  • StumbleUpon
  • Twitter
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • del.icio.us
  • email

4 Responses to “Speaking of Hacks… IE, UGH!”

  1. I find both are equally annoying (ff & ie). More importantly though is the really “old” versions of IE that bug me. People just generally don’t upgrade.

  2. Trisha says:

    You’re right Beth. I have much better luck with IE7. 6 still gets under my nerves with no .png support. I dont check before prior to 6, and theyre just out of luck.

  3. Brooke says:

    I’m finding this works in IE6 and not IE7. Is that right?

  4. Trisha says:

    i think this post is already outdated. after lots and lots of practice, I find that good valid code should be the fix for any browser.

    two great tools:
    xhtml validator
    css validator

    write straightforward, solid code and keep validating until there are no more errors. that usually fixes most issues.
    :)

Leave a Reply