表格格式的问题

时间:2015-08-18 04:25:53

标签: html css html-table

我在格式化正在创建的表时遇到一些困难。我希望我的<th>能够获得表格的全宽和<tr>的全部宽度。即使我将第一个<td>设置为200px的宽度,它也会超过我的<th>

https://jsfiddle.net/bL47ro78/

我怎样才能......

 <th class="view_topic_th">
    <td>Date</td>
</th>

要和我的桌子和<tr?一样宽。

1 个答案:

答案 0 :(得分:1)

以下是可以帮助您格式化表格的解决方案:

var getChildren(key) {
  var x = source.filter(function(s){
     return s.k == key;
  });

  if( x.length && typeof x[0].children !== 'undefined') {
   return x[0].children;
  }

  return false;
}

http://jsfiddle.net/bL47ro78/10/

相关问题