IE9 strange table issue

2019-03-20 05:00发布

Hi all i'm wondering if someone can help as i've come up blank! I have a table which has been styled up using css. It renders fine in all browsers apart from IE9 (even other ie versions), i have no idea why! I've even tried removing all css and it still happens. Any thoughts?

enter image description here Example html:

<tr class="altRow">
  <td style="text-align: center;"><img style="vertical-align: middle; margin: 3px 0px -3px -3px;" alt="outgoing" src="/Images/outgoing.png"></td>     
  <td>+441279342352</td>  
  <td>+441279342352</td>     
  <td>9325691</td>     
  <td>02/12/2011 18:21:34</td>     
  <td></td>               
  <td>02/12/2011 18:21:58</td>  
  <td></td>   
  <td>00:00:24</td>                  
</tr>

2条回答
Lonely孤独者°
2楼-- · 2019-03-20 05:43

This seems to be a known IE9 bug confirmed by Microsoft. See here:

http://social.msdn.microsoft.com/Forums/pl/iewebdevelopment/thread/e6f49d52-ec3f-47c5-802e-b80d1a58ed39

As a workaround, you need to replace all spaces between </td> and <td>. For example this td block;

  <td>9325691</td>      
  <td>02/12/2011 18:21:34</td>      
  <td></td>                
  <td>02/12/2011 18:21:58</td>

should be changed to;

<td>9325691</td><td>02/12/2011 18:21:34</td><td></td><td>02/12/2011 18:21:58</td>

This seems to be the only solution until we get an IE9 bug-fix for this issue.

Edit: Also this link seems to be helpful like the other one above.

http://social.msdn.microsoft.com/Forums/da-DK/iewebdevelopment/thread/28d78780-c95c-4c35-9695-237ebb912d90

查看更多
走好不送
3楼-- · 2019-03-20 05:43

I had the same issue on IE9 and I resolved it by formatting the code. In my case, it was happening when i tried to sort the data. If you are using IDE that supports auto formatting, try it. I used eclipse and selected the whole code (Ctrl+A) and formatted it (Ctrl+Shift+F`).

查看更多
登录 后发表回答