I want to blank out various cells of a table (in javascript) using CSS. My table uses alternating background colors for each row. In IE, when I set the visibility property of a cell to hidden, the resulting area appears white, rather than the background color of the row. I'll include a sample of what I mean below. Essentially, I want to see the background color behind cell 1,4. FF displays this correctly (or at least, how I want. :-)
Thanks for any help y'all can provide...
nathan
HTML Code:<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head> <title>CSS Visibility IE 6.0 Bug</title> <style type="text/css"> tr.header { background-color: #CCCC99; } tr.even { background-color: #ECECCC; } tr.odd { background-color: white; } td.invisibleeven { visibility: hidden; } td.invisibleodd { visibility: hidden; } </style> </head> <body> <h1>CSS Visibility IE 6.0 Bug</h1> <h2>Table 1</h2> <table> <tr class="header"><th>Head 1</th><th>Head 2</th></tr> <tr class="odd"><td class="odd">Cell 1,1</td><td class="odd">Cell 2,1</td></tr> <tr class="even"><td class="even">Cell 1,2</td><td class="even">Cell 2,2</td></tr> <tr class="odd"><td class="invisibleodd">Cell 1,3</td><td class="odd">Cell 2,3</td></tr> <tr class="even"><td class="invisibleeven">Cell 1,4</td><td class="even">Cell 2,4</td></tr> <tr class="odd"><td class="odd">Cell 1,5</td><td class="odd">Cell 2,5</td></tr> <tr class="even"><td class="even">Cell 1,6</td><td class="even">Cell 2,6</td></tr> </table> </body> </html>



Reply With Quote


Bookmarks