IE7 Can't Handle 'table-row'

Album Cover: No Code

"Are you woman enough to be my man?"
Pearl Jam / Hail Hail

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.

Comments

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

Regards,

Viqar Amjad

Permalink

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!

Permalink

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

I HATE IE7!!! I HATE IE7!!!! HATE HATE HAT!!!!!

Permalink

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??

CPH

Permalink

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

Found solution here: http://forums.whirlpool.net.au/archive/633228

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

Permalink

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"]
[table]
[tr]
[td][p]Hello1[/p] [/td]
[/tr]
........................
[/table]
[/div]


and using a css class like below
.myClass {
margin-left:235px;
}
.myClass p {
margin-left:-5px;
}

Permalink

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.

Name:

Email Address:

Website:

Comments:

Check this box if you hate spam.