Skip to content Skip to sidebar Skip to footer

Bootstrap: Fluid Table Too Wide For Window

I'm working on a project using twitter bootstrap. We have a table that has lots of columns and is going to be larger than the browser window almost every time. This is what happens

Solution 1:

This was the only solution that worked for me...

    .table {
        max-width: none;
        table-layout: fixed;
        word-wrap: break-word;
    }

Solution 2:

If you are on Bootstrap 3, another approach is to wrap your table in a

<divclass="table-responsive"><table>...</table></div>

This makes the table responsive.

Solution 3:

Bootstrap has the following style applied to Tables:

table {
    max-width: 100%;
}

If you override that property in your custom stylesheet it should hopefully solve the problem. Changing it to 'none' should work.

table {
    max-width: none;
}

Solution 4:

You can apply the style = "overflow: auto;" to put a horizontal scroll bar at your table. Thus the design will still remain responsive. Follow the code:

.table-scrollable{
    overflow: auto;
}

And use it on your div:

<div class='span11 table-scrollable'>

Solution 5:

Applying the style = "overflow: auto;" worked just fine for me

Post a Comment for "Bootstrap: Fluid Table Too Wide For Window"