HTML CSS How to stop a table cell from expanding

前端 未结 7 943
执笔经年
执笔经年 2020-12-08 02:03

I have a table which is built with the contents coming from a returned dataset. What I want to do is stop a \'description\' cell from expanding over 280px wide, no matter w

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 02:59

    It appears that your HTML syntax is incorrect for the table cell. Before you try the other idea below, confirm if this works or not... You can also try adding this to your table itself: table-layout:fixed.. .

    
       [content]
    
    

    New HTML

    
       
    [content]

    CSS Class:

    .MyClass{
       height: 280px; 
       width: 456px; 
       overflow: hidden;
       white-space: nowrap;
    }
    

提交回复
热议问题