日期:2014-05-17  浏览次数:20626 次

如何使表格内的单td列宽度固定,且表格总体带滚动条?
HTML code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<div class="view-content">
  <table class="views-table cols-2">
    <thead>
      <tr>
        <th class="views-field views-field-title"> 姓名 </th>
        <th class="views-field views-field-field-xingbie-value"> 性别 </th>
        <th class="views-field views-field-field-nianling-value"> 年龄 </th>
        <th class="views-field views-field-field-shouji-value"> 手机 </th>
        <th class="views-field views-field-field-guhua-value"> 固话 </th>
        <th class="views-field views-field-field-emailqq-value"> 联系E-mail/QQ </th>
        <th class="views-field views-field-field-jiguan-value"> 籍贯 </th>
        <th class="views-field views-field-field-loupanmingcheng-value"> 楼盘名称 </th>
        <th class="views-field views-field-field-yigouhuxing-value"> 已购户型 </th>
        <th class="views-field views-field-field-zhiyechanquqn-value"> 置业产权 </th>
        <th class="views-field views-field-field-goufangshijian-value"> 购房时间 </th>
        <th class="views-field views-field-field-goumaijiage-value"> 购买价格 </th>
        <th class="views-field views-field-field-zhiyemudi-value"> 置业目的 </th>
        <th class="views-field views-field-field-xiaochanquanliaojie-value"> 对小产权房的了解 </th>
        <th class="views-field views-field-field-yewuyuan-value"> 业务员 </th>
        <th class="views-field views-field-field-zhiyeguwen-value"> 置业顾问 </th>
        <th class="views-field views-field-field-kehuleibie-value"> 客户类别 </th>
        <th class="views-field views-field-field-kehulaiyuan-value"> 客户来源 </th>
        <th class="views-field views-field-field-goufangdizhi-value"> 购房地址 </th>
        <th class="views-field views-field-field-laiziquyu-value"> 客户来自区域 </th>
        <th class="views-field views-field-field-yigoumianji-value"> 已购面积 </th>
        <th class="views-field views-field-field-kehufangtan-value"> 客户访谈 </th>
      </tr>
    </thead>
    <tbody>
      <tr class="odd views-row-first">
        <td class="views-field views-field-title"><a href="/node/24">张三</a></td>
        <td class="views-field views-field-field-xingbie-value"> 男 </td>
        <td class="views-field views-field-field-nianling-value"> 33 </td>
        <td class="views-field views-field-field-shouji-value"> 33334444222 </td>
        <td class="views-field views-field-field-guhua-value"> 010-231456 </td>
        <td class="views-field views-field-field-emailqq-value"> afsd@sf.com </td>
        <td class="views-field views-field-field-jiguan-value"> sdf测试测试测试测试测试测试测试测试测... </td>
        <td class="views-field views-field-field-loupanmingcheng-value"> 试验楼盘2 </td>
        <td class="views-field views-field-field-yigouhuxing-value"> 一房一厅 </td>
        <td class="views-field views-fiel