Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9226483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:50:31+00:00 2026-06-18T04:50:31+00:00

I am creating a scrolling table with fixed headers which works perfectly except for

  • 0

I am creating a scrolling table with fixed headers which works perfectly except for one slight issue. The columns do not align with their headers in IE, but they do align properly in the other major browsers (Chrome, firefox, opera, safari)

My question is what do I need to add or maybe even remove so I can the get the alignment sorted in IE?

Below is a screen grab showing what it looks like:

enter image description here

Below is HTML and CSS regarding of table above with their dummy data:

HTML:

    <table id="tableqanda" align="center" cellpadding="0" cellspacing="0">
    <thead>
    <tr>
        <th width="5%" class="questionno">Question No.</th>
        <th width="29%" class="question">Question</th>
        <th width="7%" class="option">Option Type</th>
        <th width="6%" class="noofanswers">Number of Answers</th>
        <th width="8%" class="answer">Answer</th>
        <th width="6%" class="noofreplies">Number of Replies</th>
        <th width="6%" class="noofmarks">Number of Marks</th>
        <th width="11%" class="image">Image</th>
        <th width="11%" class="video">Video</th>
        <th width="11%" class="audio">Audio</th>
    </tr>
    </thead>
    </table>
    <div id="tableqanda_onthefly_container">
    <table id="tableqanda_onthefly" align="center" cellpadding="0" cellspacing="0">
    <tbody>
        <tr class="tableqandarow">
<td width="5%" class="questionno">1</td>
<td width="29%" class="question">What is 4+4</td>
<td width="7%" class="option">A-E</td>
<td width="6%" class="noofanswers">1</td>
<td width="8%" class="answers">B</td>
<td width="6%" class="noofreplies">Multiple</td>
<td width="6%" class="noofmarks">5</td>
<td width="11%" class="imagetd">&nbsp;</td>
<td width="11%" class="videotd">&nbsp;</td>
<td width="11%" class="audiotd">&nbsp;</td>
</tr>
<tr class="tableqandarow">
<td width="5%" class="questionno">2</td>
<td width="29%" class="question">Name these 2 things</td>
<td width="7%" class="option">A-D</td>
<td width="6%" class="noofanswers">2</td>
<td width="8%" class="answers">A,C</td>
<td width="6%" class="noofreplies">Multiple</td>
<td width="6%" class="noofmarks">5</td>
<td width="11%" class="imagetd">&nbsp;</td>
<td width="11%" class="videotd">&nbsp;</td>
<td width="11%" class="audiotd">&nbsp;</td>
</tr>
    </tbody>
    </table>
    </div>

CSS:

#tableqanda_onthefly_container
{
    width:100%;
    overflow-y: scroll;
    overflow-x: hidden;
    max-height:500px;
    clear:both;
}

#tableqanda_onthefly
{
    width:100%;
    clear:both;
    overflow:auto;
}

#tableqanda, #tableqanda_onthefly{
    border:1px black solid;
    border-collapse:collapse;
    table-layout:fixed;
}   

#tableqanda{
    width:100%;
    margin-left:0;
    float:left;
}   
            

#tableqanda td { 
    vertical-align: middle;
}
     
#tableqanda th{
    border:1px black solid;
    border-collapse:collapse;
    text-align:center;
}


#tableqanda_onthefly td{
    border:1px black solid;
    border-collapse:collapse;
    word-wrap:break-word;
}

.tableqandarow{
    border:1px black solid;
    border-collapse:collapse;
}

I also have a jQuery code which sets a width of a scroll abr but do not know if this makes a difference:

$(document).ready(function(){
    var flag = true;
    
    if(flag == true)
    {
        var qanda_tbl = $("#tableqanda").width();
        $("#tableqanda").css({"width": (qanda_tbl - 16)+ "px"});
    }
    
    var qanda_tbl_onthefly = $("#tableqanda_onthefly").width();
    
    if(qanda_tbl > qanda_tbl_onthefly)
    {
         $("#tableqanda").css({"width": (qanda_tbl_onthefly - 16)+ "px"});
         $("#tableqanda_onthefly_container").css({"width": (qanda_tbl_onthefly)+ "px"});
    }
    });

UPDATE:

I forgot to include a Jfiddle, Here is a jsfiddle which as you can see it aligns the columns correctly with the current code. But there must be something missing in ie in order for it to do this in ie: http://jsfiddle.net/q5ukD/1/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:50:32+00:00Added an answer on June 18, 2026 at 4:50 am

    how about removing width:100% on #tableqanda_onthefly

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a dyanamic scrolling div and it works fine on Jsfiddle as seen
Hi I am creating GridView from url in android,everything is working scrolling is not
I use position:fixed for creating a chat window like gmail it works correclty in
I am creating a horizontal side-scrolling shooter which I plan to release on mobile
I’m creating a site in wordpress which are using the jQuery scrolling function for
Possible Duplicate: HTML table with fixed headers? I want to know what is the
I am creating a website which uses jquery scrolling as the method of navigation
My code for creating the data table looks like this: myDataTable = new YAHOO.widget.ScrollingDataTable(
I have an optimization problem for the headers of a table with plain style.
I'm creating a 2d side scrolling game and have a question regarding the collision.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.