User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:184.108.40.206) Gecko/20100401 Firefox/3.6.3 GTB7.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:220.127.116.11) Gecko/20100401 Firefox/3.6.3 GTB7.1 Not sure if this is really a bug, as this works only on IE 8 and all firefox, Chrome, Safari all fails for same. We have a Table with 4 Columns, and last column has a link that toggle just next TABLE ROW [TR] to display:none or block. When we click on EXPAND link, it shows the TR with only one TD with Colspan="4" however the text content doesn't get expanded to 4 columns but restrict to first column only. We verify that HTML is code for syntax [maybe we miss something]. Reproducible: Always Steps to Reproduce: 1. Visit http://www.marktheglobe.com/our-services/ 2. Click Expand All 3. See the problem. Actual Results: It is rendering problem/bug. See details of error Expected Results: It should open the new TR with colspan=4. i.e. it should respect the colspan value when display gets on/off
Well, "block" is the wrong display property for <tr>. Try something like this: if(!e)return true; e.style.display="block"; e.style.display="table-row"; See also https://developer.mozilla.org/en/CSS/display
Well the Display to "table-row" does the job well. Thanks. However I still have confusion, that why display:block shouldn't render as table row? I understand that table-row is specific to this, but when we set to display:block then it should render as "block" per description, which doesn't mean it don't consider the Actual TAG property. let me try to explain in otherwords. If we set display as Block, how it calculate its width and height? We are setting height and width of TR, and TR's area is depended on TABLE Cellpadding/Cellspacing, child TD etc, so why it take TR to just one ROW in table and not all row? I still say it should consider the colspan when Display block. Not sure if I make sense at all. Thanks for solution though.
This are the mysteries of the CSS table model, I can't answer your questions in detail, sorry. See yourself: http://www.w3.org/TR/CSS2/tables.html#table-display (btw, you can expect that future versions of IE may behave the same way)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
Simply e.style.display=""; should work as well in all browsers.
You need to log in before you can comment on or make changes to this bug.