homepage Welcome to WebmasterWorld Guest from 54.211.97.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Alternative to display:none
Trying to avoid another IE bug
MatthewHSE

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4157 posted 12:37 am on Jul 21, 2004 (gmt 0)

I'm working on a new layout that will be using quite a few floats. In order to work for many pages on my site, I'll be using body id's and using display:none to hide certain elements within certain body id's. But, according to this article...

[positioniseverything.net...]

...using floats and display:none can cause really odd IE bugs that could potentially destroy a page layout. So I was wondering, is there any alternative to display:none, perhaps using some sort of width/overflow combination, that works reliably, cross-browser, to hide page elements even if they have content in them?

Of particular interest in the article:

Update! July 5, 2004 It turns out that this duplicating characters bug can be triggered by other things than just HTML comments. Phil Baines points out that any elements given the style {display: none} will also induce the bug. Other than that, the same conditions apply. Since HTML comments remove content from a page just like {display: none}, does this mean that IE is using the same buggy mechanism for both?

This should be a good one for all of us to puzzle and stew over for awhile; so far I haven't come up with a solution that works. Should be an interesting study though!

Thanks,

Matthew

 

SethCall

10+ Year Member



 
Msg#: 4157 posted 3:06 am on Jul 21, 2004 (gmt 0)

wow... that really sucks.

Only thing that comes to mind is setting height and width to 0?

DrDoc

WebmasterWorld Senior Member drdoc us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4157 posted 4:51 am on Jul 21, 2004 (gmt 0)

Don't worry about it... If there's ever duplicated characters and such, just add
display:inline; to the floated element. In fact, always add display:inline; to all floated elements to avoid other funky bugs in IE.
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved