Bootstrap tables overflowing with long unspaced text

前端 未结 5 1231
谎友^
谎友^ 2020-12-23 12:56

I\'m using Bootstrap and I have a table with a few columns, the last of which sometimes has a long piece of text without spaces. I noticed that under certain screen sizes, t

5条回答
  •  一向
    一向 (楼主)
    2020-12-23 13:53

    Albers answer did the trick for me

    .the-table {
     table-layout: fixed;
     word-wrap: break-word;
    }
    

    In the JS to load it dynamically add

     $("#"  + tableName ).addClass('the-table'); 
    

    Hope it helps!!

提交回复
热议问题