IE7 Can't Handle 'table-row'

Album Cover: It's Not Me, It's You

"I'm not a saint, but I'm not a sinner...everything's cool as long as I'm getting thinner."
Lily Allen / The Fear

Posted on December 13, 2007 6:15 PM in Web Development
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

While working on the script mentioned in Hiding and Displaying Table Rows, I made the mistake of only testing my changes in Firefox. Or maybe finally deciding to try it out in the IE7 was the mistake. Either way, I realized that the simple JavaScript function I had written to handle hiding and displaying the table rows was returning an error in IE7 that looked something like the following:

Error: Could not get the display property. Invalid argument.

Apparently, according to this thread (and confirmed at least once by Dustin Wilson over in the comments at mezzoblue), several of the acceptable values for the display property aren't deemed acceptable by IE7.

Talk about lame.


Viqar Amjad on October 29, 2009 at 3:05 PM:

I am creating table in html with CSS. But there is very stupiid problem I am face. The table rows are working fine in FireFox, Google Chrome, Safari , Opera and IE8. But in IE7 rows in table has extra spacing. I have tried many techniqes to resolve it but failed. Could anyone tell me how I can resolve this issue in IE7. Thanks


Viqar Amjad


Shaunny on January 29, 2010 at 1:08 AM:

Make sure all borders and margins surrounding the table is set to 0, and finally use border-collapse:collapse; Oh the love and joy of IE and being non standard!


maathieu on February 22, 2010 at 7:00 AM:



Chris Hale on September 15, 2010 at 6:20 AM:

I have found that the table-row attribute in ;

document.getElementByID('myTableRow').style.display = "table-row"

works in Firefox but not in IE7. :-

Is there a work around or an IE7 equivelant??



Jeff on January 29, 2011 at 2:56 AM:

Found solution here:

Setting style.display to "" (empty string) makes browser use default, meaning display = table-row in FF and in IE display = whatever Microsoft uses instead


Swagato Bhatta on July 26, 2011 at 12:12 AM:

I solved the table problem in IE7 using a div like below

[div class="myClass"]
[td][p]Hello1[/p] [/td]

and using a css class like below
.myClass {
.myClass p {


Post Comments

If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.


Email Address:



Check this box if you hate spam.