Results 1 to 4 of 4

Thread: Tbody scroll, Fixed Thead, Text Sizing Breaks in IE

  1. #1
    Join Date
    Sep 2007
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Tbody scroll, Fixed Thead, Text Sizing Breaks in IE

    I've found a table example online that suites my needs of having a xbrowser 'tbody' scroll while the thead stays in place. Unfortunately, the thead misaligns when font size is increased or decreased in IE. Can anyone suggest a fix?

    ***

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <style type='text/css' >
    .windowDataScroll {border: 2px solid #cccccc;}
    .dataScroll thead {background-color: #f4f4f4;}
    .dataScroll th, .dataScroll td{padding: 5px 3px; text-align: left; border-bottom: 1px solid #cccccc;}
    .dataScroll{ width:100%;}
    .dataScroll > tbody{height:200px !important; overflow:auto; overflow-x: hidden;}
    .dataScroll > tbody.scrollContent tr {height:15px;}

    .dataScroll .th_extra {width: 18px; padding: 0; border-right-width: 0;}
    .windowDataScroll > .dataScroll .th_extra{ width: 19px;}
    </style>
    <!--[if IE]>
    <style type="text/css">
    div.windowDataScroll {height: 200px; overflow-y: scroll; overflow: hidden; width: 99.25%; } /*overflow: auto;*/
    thead.fixedHeader tr {position: relative;}
    .dataScroll{width: expression(this.parentNode.offsetWidth-20);}
    .th_extra {display:none;}
    </style>
    <![endif]-->
    </head>
    <body>
    <div class="windowDataScroll">
    <table border='0' cellspacing='0' cellpadding='0' class="dataScroll">
    <thead class="fixedHeader">
    <tr>
    <th>wkdjchlkj</th>
    <th>khwdgc9376</th>
    <th>76235uyg</th>
    <th>yg</th>
    <th class='th_extra'></th>
    </tr>
    </thead>
    <tbody class="scrollContent">
    <tr>
    <td>1115551111</td>
    <td>JAh RAsta</td>
    <td>222</td>
    <td>444444444444fjdkal;j fieo;aj fdkla;jfdk ;jk;</td>
    </tr>
    <!--15 more rows-->
    </tbody>
    </table>
    </div>
    </body>
    </html>

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I tried your page in IE7 and changed the text size but I didn't notice any problems. Could you please elaborate or post a screenshot of the problem?

  3. The Following User Says Thank You to Snookerman For This Useful Post:

    rayray1 (12-31-2008)

  4. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by Snookerman View Post
    I tried your page in IE7 and changed the text size but I didn't notice any problems. Could you please elaborate or post a screenshot of the problem?
    The OP is probably talking about IE6. IE7 uses a zoom feature to resize text. It shouldn't change the layout (unless it's used to the extreme).

  5. #4
    Join Date
    Sep 2007
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Definately. Thank you for looking into my issue. http://www.raneehyde.com/IEscreenshots.pdf

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •