javascript - Why is IE7 & IE8 says that it 'hasLayout', when it doesn't? -


html:

  <div class="table" >       <div class="row" >         <span>tb div</span> <span>col2</span> <span>col3</span>       </div>         <div class="row" >         <span>col1</span> <span>col2 test</span> <span>col3</span>       </div>         <div class="row" > <span>col1</span> <span>col2</span> <span>col3 test</span>       </div>     </div>      <table>       <tr id="testrow">         <td>tb <'table'></td> <td>col2</td> <td>col3</td>       </tr>       <tr >         <td>col1</td> <td>col2 test</td> <td>col3</td>       </tr>       <tr >         <td>col1</td> <td>col2</td> <td>col3 test</td>       </tr>     </table> 

css:

.table, table {     display:table;          /*         width:200px;          height:100px;         zoom:1;         */         } .row  { display:table-row; } .row, tr {         width:200px !important;         min-height:1px !important;         zoom:1;         white-space:nowrap;     -ms-filter:"progid:dximagetransform.microsoft.alpha(opacity=20)";     filter: alpha(opacity=20);     -moz-opacity:0.2;     -khtml-opacity: 0.2;     opacity: 0.2; } .row span, td {display:table-cell;padding: 5px;} 

javascript

$(function () {      console.log (document.getelementbyid('testrow2').currentstyle.haslayout);     //$('.row, tr').fadeto('fast',0.2); }); 

jsbin jsfiddle

because opacity not working should 'false' in console (for ie7&8), result 'true'

does element 'haslayout' opacity not working other reason?

although doubt it, because not jquery can't set opacity.

looks "table" elements have haslayout===true default. opacity tr not working, since need define opacity td instead.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -