Skip to content Skip to sidebar Skip to footer

Vertical Scroll Table Body Inside Bootstrap Modal

I'm using bootstrap3 modal and trying to create a table inside a modal. I want the tbody to have vertical scroll. I've tried adding the height and overflow-y: auto to tbody, but it

Solution 1:

I've finally found an answer for this.

I adapted the code from here: http://jsfiddle.net/T9Bhm/7/

The CSS Answer :

table {
        width: 100%;
    }

    thead, tbody, tr, td, th { display: block; }

    tr:after {
        content: ' ';
        display: block;
        visibility: hidden;
        clear: both;
    }

    theadth {
        height: 30px;

        /*text-align: left;*/
    }

    tbody {
        height: 120px;
        overflow-y: auto;
    }

    thead {
        /* fallback */
    }


    tbodytd, theadth {
        width: 19.2%;
        float: left;
    }

Post a Comment for "Vertical Scroll Table Body Inside Bootstrap Modal"