CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Steve Hebert's Development Blog

Steve's Blog - From .Net to dotMath and everything in between.

update: toggling a tbody tag with firefox bug

I blogged a few weeks ago about a firefox bug when toggling a tbody tag to display or hide.

When declaring the section to be hidden, I set the tbody tag's display style to "none".  When attempting to show the tbody I was setting the display style to "incline" ( I also tried "block" which did not work either).

A co-worker found that simply clearing the display style allows this to function correctly.  Internet Explorer works fine with this setting.

So, the lesson learned is - display = 'none' or display = '' will work on both browsers.





Comments

Damien Guard said:

Did you try "inline" being that there is no such css display style as "incline"?

[)amien
# June 7, 2006 4:18 PM

Jon Galloway said:

To be nitpicky, it's actually an IE bug, not a Firefox bug. The default display style for TBODY in CSS 2.1 is "table-row-group", not "block" or "inline". So when you're toggling to those values, you're not resetting it to the original value. IE's works fine with incorrect code because it's not following the spec.

http://www.w3.org/TR/REC-CSS2/tables.html
http://www.communitymx.com/content/article.cfm?cid=53F70

See J Wynia's comments here:
http://blogs.ittoolbox.com/visualbasic/dotnet/archives/tbody-to-the-rescue-4097?sp=CM
# June 7, 2006 7:38 PM

Jon Galloway said:

To be nitpicky, it's actually an IE bug, not a Firefox bug. The default display style for TBODY in CSS 2.1 is "table-row-group", not "block" or "inline". So when you're toggling to those values, you're not resetting it to the original value. IE's works fine with incorrect code because it's not following the spec.

http://www.w3.org/TR/REC-CSS2/tables.html
http://www.communitymx.com/content/article.cfm?cid=53F70

See J Wynia's comments here:
http://blogs.ittoolbox.com/visualbasic/dotnet/archives/tbody-to-the-rescue-4097?sp=CM
# June 7, 2006 7:53 PM

Damien Guard said:

You should be setting the display property to "table-row-group" to redisplay the tbody as per http://www.w3.org/TR/REC-CSS2/tables.html#q2

[)amien
# June 9, 2006 5:41 AM
Check out Devlicio.us!

Our Sponsors

Free Tech Publications