jquery - Fixed column table with scrollable body not rendering properly in IE 9 & 10 -


i have table created has first 2 columns "fixed" in place while body can scroll horizontally. accomplished using 2 tables, 1 fixed columns , 1 rest of content. using jquery keep row heights same across 2 tables, running issues in ie 9 & 10 row heights don't seem quite matching up.

this truncated version of table html:

<div style="width: auto" class="groupdetails"> <table id="table1" class="table1" border="0" cellspacing="0">     <thead>         <th class="placeholder" colspan="2">             &nbsp;         </th>     </thead>     <tbody>         <tr class="shared">             <td class="groupname">test customer 1:</td>             <td class="typename">first</td>         </tr>         <tr class="shared">             <td class="typename" colspan="2">second</td>         </tr>         <tr class="shared totals">             <td class="typename" colspan="2">total top:</td>         </tr>     </tbody> </table> <div class="table2">     <table border="0" cellspacing="0" id="table2">         <thead>             <tr class="subheader">                 <th>header</th>                 <th>header</th>                 <th>header</th>                 <th>header</th>                 <th>&nbsp;</th>                 <th>header</th>                 <th>header</th>                 <th>header</th>                 <th>header</th>                 <th>header</th>                 <th>&nbsp;</th>                 <th>header</th>                 <th>header</th>                 <th>&nbsp;</th>                 <th>&nbsp;</th>                 <th>&nbsp;</th>             </tr>         </thead>         <tbody>             <tr>                 <td>1</td>                 <td>4</td>                 <td>3</td>                 <td>2</td>                 <td>&nbsp;</td>                 <td>2</td>                 <td>3</td>                 <td>2</td>                 <td>y</td>                 <td>2</td>                 <td>&nbsp;</td>                 <td>5</td>                 <td>6</td>                 <td>&nbsp;</td>                 <td>6</td>                 <td>y</td>             </tr><tr>                 <td>1</td>                 <td>4</td>                 <td>3</td>                 <td>2</td>                 <td>&nbsp;</td>                 <td>2</td>                 <td>3</td>                 <td>2</td>                 <td>y</td>                 <td>&nbsp;</td>                 <td>&nbsp;</td>                 <td>&nbsp;</td>                 <td>&nbsp;</td>                 <td>&nbsp;</td>                 <td>6</td>                 <td>&nbsp;</td>             </tr><tr class="totals">                 <td>2</td>                 <td>8</td>                 <td>6</td>                 <td>4</td>                 <td>&nbsp;</td>                 <td>4</td>                 <td>6</td>                 <td>4</td>                 <td>y</td>                 <td>2</td>                 <td>&nbsp;</td>                 <td>5</td>                 <td>6</td>                 <td>&nbsp;</td>                 <td>12</td>                 <td>y</td>             </tr>         </tbody>     </table> </div> 

and jquery i'm using is:

$("div.groupdetails").find(".table1 > tbody > tr").each(function() {     var originalindex = $(this).index();     $("div.groupdetails").find(".table2 tbody tr").eq(originalindex)         .height($(this).height()); }); 

i created fiddle show i'm talking about: http://jsfiddle.net/4hxbz/2/. i've been banging head against wall on while now, can given appreciated.

answered in comments , converted community wiki:

@ross wrote:

i added line-height: 1.1em on table > tbody > tr > td selector match font-size brought first set of rows line in ie10, couldn't spot difference lower rows still problematic... hope points in right direction!

@op wrote:

that set me in right direction , changing padding value of same selector "2px 0", seems working fine in ie now.


Comments

Popular posts from this blog

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

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

url rewriting - How to redirect a http POST with urlrewritefilter -