This is a fairly common issue in IE. Empty elements, even if you set a height of 0, will have a height of it's font-size or line-height.
-- Brandon Aaron On Thu, May 21, 2009 at 6:15 PM, Eric Martin <[email protected]> wrote: > > I found this strange issue and wanted to see if 1) anyone else had > stumbled upon it and 2) if there was a fix for it. > > Using jQuery 1.2.6+ (I haven't tested with earlier versions), consider > these two statements: > > $('<div></div>').appendTo('body').height(); > $('<div></div>').appendTo('body').hide().height(); > > In Firefox, both report 0. In IE (6 & 7), the first reports 0, the > second, some value based on the font size. For example, on my site > (ericmmartin.com), with IE, I get 0 and 22. > > Since it seems that jQuery sets display to none for hide(), it sounds > like an IE bug. > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
