Adjusting table cell width

后端 未结 5 1249
臣服心动
臣服心动 2020-12-17 18:05

Let\'s take 4 table columns - ID, Text, Date, Action. In my case table have always constant width - in example 960px.

5条回答
  •  旧巷少年郎
    2020-12-17 18:49

    basically, it's just like this: http://jsfiddle.net/49W5A/ - you have to set the cell-width to something small (like 1px) to make them stay as small as possible.

    but as you'll see, theres one problem with the date-fields doing a line-wrap. to prevent this, just add white-space: nowrap; for your text-field: http://jsfiddle.net/ZXu7U/

    working example:

    
    
    1 Some Text... May 2011 Edit
    2 Another Text... April 2011 Edit

提交回复
热议问题