If you are reading this, please get modern browser.
skip to main content | skip to main navigation | skip to secondary content

IE 7 quirks, round one

~ 23rd October 2006. · 00:55 CET · permanent link · printer friendly ~

Internet Explorer logotype First of all, from this few first days testing it, Internet Explorer in it’s last reincarnation is much better browser than I thought it’d ever be. It’s still not the first class piece of software, but at least most of the real-life CSS issues have been fixed. However, there are still a few nasties.

Order of typefaces in font-family

Specifying fonts in font-family in the (unexplainable) wrong order, makes browser render the ugliest text you’ve ever seen, even if a user has properly installed font (in this case Helvetica):

body { font-family: Helvetica, Arial, sans-serif; }

Instead, one should set font-family rule with Arial preceding Helvetica. What is the reason behind this, I really can’t tell, but I don’t like it.

Width in Ems

Element width set in ems still renders pretty wierd, which can be trouble if your layout requires zoom flexibility (IE 7 has native zoom rendering functionality similar to Opera).

Let’s take a look at hr-netiquette.org. Try resizing text – the page should zoom in and out. This is accomplished by setting width in ems (65.2 ems to be precise) for the main wrapping division. Since the body font size is reset to 10 pixels, 65.2em is equivalent to 652px.

In Internet Explorer 6.0 and now in 7.0 too, 65.2em renders as 648px, so the conditional comments stylesheet is applied with the rule that overrides it with 65.6em.

Generally, to translate em width for IE, multiply it by 1,007, but you can also PrntScr and paste in PhotoShop and increment accordingly, if you’re aiming for maximum precision.

Image height

Content images without explicitly set height property (or corresponding element attribute) will cause footer to stay in the position where it was rendered initially, before all the images were loaded. This is well known bug in Firefox, here it comes with IE 7, too.

The workaround is simple – set height attribute in HTML or height property in CSS for content images.

More to come?

Sure. But we’re ready!

21 Comments

  1. Instead, one should set font-family rule with Arial preceding Helvetica. What is the reason behind this, I really can’t tell, but I don’t like it.

    Could it be because Windows comes with Arial?

  2. No, it makes no difference what order the font is specified, JK, the browser is supposed to ignore the fonts it cannot display and grab the first one it can.

    It think what Marko is suggesting is that IE7 is messing with a long established CSS convention, whether intentional or not, and if it bears out I don’t much like it either. I find it inexcusable that Microsoft, with it’s multi-billion dollar development (appropriations) budget and a team as big as the IE team, can’t build a browser that works at least as good as Firefox, or even Opera.

    Not a question of cannot, but will not–in my estimation. Microsoft continues to be the problem, not the solution.

  3. You know, it just occured to me… I once specified Helvetica before Arial and wondered why my site looked so awful. I had Photoshop open, so I pulled down the font list. I found Helvetica. For some reason, I connot remember how, why, or when, I had Helvetica on my PC and it rendered poorly. I sandboxed it and all is well.

    I still believe Microsoft and their browser are the problem not the solution. But still… I supposed I ought to install 7. Now I just need a disposable PC to install it on *cough*.

  4. I still believe Microsoft and their browser are the problem not the solution. But still… I supposed I ought to install 7. Now I just need a disposable PC to install it on *cough*.

    Yes, numerous developers are in search for a disposable machine these days. I have one in queue, will be available in a couple of days : )

  5. Dobar Dan Marko!

    To fix the IE font-family issue
    can we not do body { font-family: “SomeFont", Helvetica, “Arial", sans-serif; }

  6. I am sorry … I meant for IE

    body { font-family: Arial, “Helvetica", sans-serif; }

  7. Johan, that would be:
    <style type="text/css">
    /* <[CDATA[ */
    selector { font-family: Helvetica, Arial, sans-serif; }
    /* ]]> */
    </style>
    <!––[if IE 7]>
    <style type="text/css">
    selector { font-family: Arial, sans-serif; }
    </style>
    <![endif]––>

  8. You don’t need a disposable machine - there’s a standalone version of IE7 available here :)

  9. Mario, it doesn’t work the same way. I understand the skepticism, but every serious developer should try it in the real environment.

  10. You could save yourself some cash by using VirtualPC which Microsoft no longer charges for. Your only out-of-pocket cost would be an XP license, assuming you don’t have a valid, uninstalled license already. I am setting up a VM for IE 6, so I can install IE 7 natively.

    A bonus for those of you going down that route: Speed-up and usage tips for IE6 in VirtualPC.

  11. Hey, guys!

    Instead of VirtualPC, you might want to check this: http://tredosoft.com/Multiple_IE

    János

  12. Alex, thanks for the hat tip!

  13. János, I’ve used the multiple versions in the past (have them installed right now in fact - the geek in me had to include back to IE 3), but they can prove buggy causing crashes at the most inconvenient time and the conditional comments don’t always work.

    marko, you’re quite welcome!

  14. Could it possible that IE7 renders the CSS font-family order in alphabetical order? If so, then back to the drawing board IE7 programmers.

  15. I’m running rc1 as a standalone and I’m seeing some weird cursor behavior. On a div with a width and centered with margin auto the cursor is displaying ‘text’ instead of ‘default’ (arrow) when mousing over whitespace, adding a background property fixes this.
    Has anyone else seen this?

  16. I’m a student at a Milwaukee WI (USA) area school. I had the pleasure to help redesign my college’s Web site. Once IE came out, we found only one issue with the underscore hack that I used on the unordered lists we had.

    It get’s messed up. Take a look at the following page in IE7 vs. Firefox:

    http://www.cc.edu/parents/

    Point 1) I had no say in the decision to use tables :)

    Point 2) I did have the chance to write some CSS for styling purposes. I used the following code to stylize the lists:
    .listBoxed
    {
    list-style-position: outside;
    margin: 4px 0px 4px -23px;
    _margin-left: 17px;
    list-style-image:url(/images/bullet_boxed.gif);
    text-indent: 0px;
    line-height:1.5em;
    }

    It needed to be like that to work with IE6 and FF. But alas, now it looks like the undscore hack has been ‘fixed.’

    What does that mean? Well, now we have to figure out a way to code that single spec to work across FF, IE6, and IE7 which all seem to treat it differently.

  17. Kris,

    Try the following:
    .listBoxed {
    list-style: none;
    padding-left: 20px;
    background: url(/images/bullet_boxed.gif) no-repeat 0 center;
    }

    This way, you have total control over the position of the ‘bullet’.

  18. Marko: well said -> Power of CSS!

    background: url(/images/bullet_boxed.gif) no-repeat 0 center;
    }

    I believe “0 center” wont validate since top, left, bottom, right are names reserved to be used to gether, better use the equivalent ->

    background: url(/images/bullet_boxed.gif) no-repeat 0 50%;
    }

  19. Apparantly IE7 can’t display Lucida Calligraphy (not italic) - can anyone suggest a similar alternative to specify please? It just shows Times.

  20. Hi Gill, try with the Lucida Sans Unicode, or even better – test your fonts with Typetester.

  21. I’ve got a weird bug on one site where IE 7 makes random list items in an unordered list inherit the background of the ul element and get anywhere from 1 to 10 extra pixels of padding on top. I’ve been trying all week to figure out how to avoid the bug.

Sorry, the comment form is closed at this time, but if you have anything to say, please send me a message.

* Please keep in mind that this is a personal web site and it does not reflect the position or opinion of my respective employers, organizations or partners.

Typetester – compare screen type Supported by Veer.

What is this?

A web log of Marko Dugonjić, web professional from Croatia. Topics covered:

Translate this site

German, Spanish, Italian, French or Japanese (via).

See you there!

Feel like buying a book?

Try with maratz.com aStore

Worth visiting

top of the page | skip to main content | skip to main navigation | skip to secondary content