Fix multiple columns in html table (JQuery)

前端 未结 2 1230
野趣味
野趣味 2021-01-24 09:01

I am looking for a way to freeze first three columns in html table. Sample of table: http://jsfiddle.net/ee6reLug/


...
2条回答
  •  臣服心动
    2021-01-24 09:30

    answering it late.. but useful for someone searching for a solution

    I've changed your code to this --> http://jsfiddle.net/PrateekPatra26/ee6reLug/5/

    Separated the tables into two, one with 3 columns and the remaining table into another. Put them into div's and gave them specific width.

    the css:

    .pull-left {
        float: left!important
    }
    .pull-right {
        float: right!important
    }
    th{
        height:40px;
    }
    td{
        height:60px;
    }
    

    div's:

    . . .
    . . .

提交回复
热议问题