How to set the size of a column in a Bootstrap responsive table

后端 未结 3 724
说谎
说谎 2020-12-22 22:19

How do you set the size of a column in a Bootstrap responsive table? I don\'t want the table to loose its reponsive features. I need it to work in IE8 as well. I have includ

3条回答
  •  遥遥无期
    2020-12-22 22:56

    Bootstrap 4.0

    Be aware of all migration changes from Bootstrap 3 to 4. On the table you now need to enable flex box by adding the class d-flex, and drop the xs to allow bootstrap to automatically detect the viewport.

    Size Bust Waist Hips
    6 79 - 81 61 - 63 89 - 91
    8 84 - 86 66 - 68 94 - 96

    bootply

    Bootstrap 3.2

    Table column width use the same layout as grids do; using col-[viewport]-[size]. Remember the column sizes should total 12; 1 + 3 + 3 + 5 = 12 in this example.

            
                
                    Size
                    Bust
                    Waist
                    Hips
                
            
    

    Remember to set the elements rather than the elements so it sets the whole column. Here is a working BOOTPLY.

    Thanks to @Dan for reminding me to always work mobile view (col-xs-*) first.

提交回复
热议问题