DIV height issue on IE

July 31st, 2007

If you need to have a div tag smaller than 20px, then you will find it a bit hard to get on IE. Just add “overflow: hidden” to it’s style and you’re good to go.

I know it’s a quick google find, but there are several methods that you’ll find.
Some are telling you to add a   and set the font-size to 1px, but they all sound “hackish” to me.

I’ve been having several cross-browser related issues lately and all of them have to do with IE (well most of them on Safari, but I’m comparing IE/Firefox) I remember back in the old days when you had to work really hard to get it working on Netscape 4.016.

Is IE becoming the next Netscape?

Entry Filed under: Annoyances, Crossbrowser, Internet Explorer

Bookmark and Share   Del.icio.us   Technorati

10 Comments Add your own

  • 1. Graham&hellip  |  2007-08-07 at 12.57 am

    You just saved me a lot of hours…

  • 2. pixelpusher&hellip  |  2007-09-27 at 11.15 am

    nice. Bug seems to be fixed in IE7. IE has always been the most trouble for me, although it sounds like you might have been doing this for longer than me if you’ve tried to make pages netscape compatible. I just don’t understand why M$ won’t make a standards compliant browser?!

  • 3. IeIsCrap&hellip  |  2007-10-24 at 8.13 pm

    no, it’s not fixed .. you still to apply the old “hackish” style

  • 4. Danno&hellip  |  2007-10-25 at 10.22 am

    @IeIsCrap
    No mate.. The other hackish attempts are to add a div with a font size=1 with a &nbsp.
    I found this one to be the more “elegant” solution, because you could place it in your stylesheet without affecting any code.

    If you know any better solution please let me know. I always find a lot of “hack” fixes you need to pull off for IE6 lately.

    cheers,

  • 5. bwhizz&hellip  |  2008-01-19 at 10.07 pm

    thanks for the tip, you just saved my layout on my newest site from having to apply ugly hacks.

  • 6. dev&hellip&hellip  |  2008-02-01 at 12.43 am

    with every bug that they fix on IE and find the patch for, there are just more waiting to come this is another good reason to switch to firefox.

  • 7. imanzano&hellip  |  2008-06-05 at 10.08 pm

    I was lost. Thank you very much

  • 8. Ronnie Odong&hellip  |  2008-08-09 at 12.07 am

    Big thank u, it helped me pretty much.

  • 9. Mario Aeby&hellip  |  2008-08-12 at 8.03 pm

    My pseudo shadows (created using 2px-tall divs with margins) work now … Thank you very much!

  • 10. Brandon Ballentine&hellip  |  2008-10-08 at 5.09 am

    Dude, thanks so much for the tip. I’ve spend almost 2 hours designing and redesigning a part of a template thinking I was doing something wrong. Your tip worked like a charm. Thanks for posting!

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Most Recent Posts