Closed Bug 272928 Opened 20 years ago Closed 20 years ago

Inline and block visibility corrupts table.

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: mats.ahlberg, Assigned: bugzilla)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

The attached html will not work because mozilla ignores colspan in the hidden item
when it is restored.

Reproducible: Always
Steps to Reproduce:
1. Load testpage
2. Klick on links to show and hide the texts several times
3.

Actual Results:  
The table is expanded row by row after each hide and show possibly bug 197103.
And the colspan in the table is ignored.

Expected Results:  
The table should remain in its original form ant no white-space should be
inserted after the hidden item when restored.
Attached file Example of bug.
Bug is INVALID.

tr elements are not block level elements but table-row elements. You should
change your javascript to use either "display='table-row'" or "display=''".
Paul's comment is correct. Default display value of an <tr> is table-row, not block.
http://www.w3.org/TR/CSS21/visuren.html#propdef-display

You can use this page code to improve your page:

http://www.gtalbot.org/HTMLJavascriptCSS/TableRowColumnCollapse.html

Note that this code won't work perfectly if you toggle visibility of columns in
the border-collapse: collapse model.

-----------

Also, I recommend you avoid resorting to 
1) avoid "javascript:" links
http://jibbering.com/faq/#FAQ4_24
Jakob Nielsen, Top Ten Web-Design Mistakes of 2002, 6. JavaScript in Links,
http://www.useit.com/alertbox/20021223.html 
2) avoid eval()
http://jibbering.com/faq/#FAQ4_40 ;
http://dhtmlkitchen.com/learn/js/perf/using_javascript.jsp (Don't use eval section)
3) avoid nowrap and height attributes on table cells since they overconstraint
tables and they are deprecated for table cells. 

Note that MSIE 5.x and MSIE 6 support document.getElementById and
document.getElementById().style, so there is no need whatsoever to resort to
document.all.

http://www.mozilla.org/docs/web-developer/upgrade_2.html#dom_access
http://www.mozilla.org/docs/web-developer/faq.html (see JavaScript doesn’t work!
Why? section)
http://developer.apple.com/internet/webcontent/bestwebdev.html (see Javascript
section)

My 2 cents
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: