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

  • SEARCH
  • Home
  • 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 8207125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:54:10+00:00 2026-06-07T08:54:10+00:00

I have a large scroll-able table I built with Twitter bootstrap but would like

  • 0

I have a large scroll-able table I built with Twitter bootstrap but would like prevent the first column from scrolling. Is this possible?

<div class="row">
    <div class="span12" style="height: auto !important;overflow-x: scroll;">';      
        <table class="table table-striped table-bordered table-condensed">
        <thead>
            <th>Col1</th>
            <th>Col2</th>
            <th>Col3</th>
        </thead>
        <tbody>
        <tr>
            <td>data 1</td>
            <td>data 2</td>
            <td>data 3</td>
       </tr>
       </tbody>
       </table>
    </div>
</div>
  • 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-07T08:54:13+00:00Added an answer on June 7, 2026 at 8:54 am

    Here’s a demo of a possible solution, based on my earlier comment:

    DEMO: Fixed Column on Bootstrap Table

    Note that this isn’t really tested or even a complete solution for fixing a column, but rather a proof of concept for you to build on.

    Here is the relevant markup. This example uses a striped, bordered, condensed Bootstrap table

    <div id="scroller">
        <table class="table table-striped table-bordered table-condensed">
            <thead>
                ...
            </thead>
            <tbody>
                ...
            </tbody>
        </table>
    </div>
    

    And the required jQuery:

        $('#scroller table').each(function(){
        var table = $(this),
            fixedCol = table.clone(true),
            fixedWidth = table.find('th').eq(0).width(),
            tablePos = table.position();
    
        // Remove all but the first column from the cloned table
        fixedCol.find('th').not(':eq(0)').remove();
        fixedCol.find('tbody tr').each(function(){
            $(this).find('td').not(':eq(0)').remove();
        });
    
        // Set positioning so that cloned table overlays
        // first column of original table
        fixedCol.addClass('fixedCol');
        fixedCol.css({
            left: tablePos.left,
            top: tablePos.top
        });
    
        // Match column width with that of original table
        fixedCol.find('th,td').css('width',fixedWidth+'px');
    
        $('#scroller').append(fixedCol);
    });​
    

    and the needed CSS:

    #scroller {
        width: 300px;
        overflow-x: scroll;
    }
    #scroller table {
        /* just a quick hack to make the table overflow the containing div
           your method may differ */
        width: 600px;
    }
    
    #scroller .table.fixedCol {
        width: auto;
        position: absolute;
        /* below styles are specific for borderd Bootstrap tables
           to remove rounded corners on cloned table */
        -webkit-border-top-right-radius: 0px;
        -webkit-border-bottom-right-radius: 0px;
           -moz-border-radius-topright: 0px;
           -moz-border-radius-bottomright: 0px;
                border-top-right-radius: 0px;
                border-bottom-right-radius: 0px;
    }
    .table.fixedCol th,
    .table.fixedCol td {
        /* background is set to white to hide underlaying column
           of original table */
        background: white;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have large images displayed in a grouped tableview. I would like the images
I have a list of elements I would like to be able to have
I have a table which has a header row, but also a header column
I have large table, with around 200 fields. Around a 100 of those fields
I have large database table, approximately 5GB, now I wan to getCurrentSnapshot of Database
I would like to create a gallery slideshow using Jquery Tools Scrollable plugin. But
I have a large amount of data that is retrieved from a database. They
I would like to have images displayed in a horizontal list. This is what
I have an HTML table, where each cell contains a large amount of data.
I have a word document that I would like to have viewed as an

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.