1

其实我是新来的设计。我有一个 html 表,它有三行描述如下

  1. 第 1 行 - 2 列

  2. 第 2 行 -- 1 列

  3. 第 3 行 -- 3 列

现在我想将第三行列分成相等的分区但无法调整 colspan 有人可以帮我这里是代码

<table width="100%" cellpadding="5" cellspacing="0" border="1">

    <tr>
        <td align="left">Infodeep Technologies</td>
        <td align="right">3 Minutes ago</td>
    </tr>

    <tr>
        <td colspan="3" align="justify">Samsung pioneered the trend of
            a new breed of devices, now more commonly known as
            'phablets',smartphones that are (almost) nearing tablets in size.
        </td>
    </tr>

    <tr>
        <td align="left">By panel.</td>
        <td align="center">21.12%</td>
        <td align="right">21 / 30</td>
    </tr>

</table>
4

2 回答 2

0

希望这是你想要的。

<table width="100%" cellpadding="5" cellspacing="0" border="1" >

    <tr>
        <td align="left" width = "50%">Infodeep Technologies</td>
        <td align="right" colspan = "2">3 Minutes ago</td>
    </tr>

    <tr>
        <td colspan="3" align="justify">Samsung pioneered the trend of
             a new breed of devices, now more commonly known as
             'phablets',smartphones that are (almost) nearing tablets in size.
        </td>
    </tr>

    <tr>

        <table border = "1" width = "100%" >

          <tr>
            <td  align="left" width = "33%"  >By panel.</td>          
            <td  align="centre"  width = "33%" >21.12%</td>
            <td align="right"  width = "33%" >21 / 30</td>
          </tr>

        </table>

    </tr>

</table>
于 2013-02-22T10:51:55.027 回答
0

尝试添加fixed表格布局,这应该会覆盖浏览器默认调整单元格的大小。

<table width="100%" cellpadding="5" cellspacing="0" border="1" style="table-layout:fixed">

    <tr>
        <td align="left" width = "50%">Infodeep Technologies</td>
        <td align="right" colspan = "2">3 Minutes ago</td>
    </tr>

    <tr>
        <td colspan="3" align="justify">Samsung pioneered the trend of
            a new breed of devices, now more commonly known as
            'phablets',smartphones that are (almost) nearing tablets in size.
        </td>
    </tr>

    <tr>
        <td align="left" col>By panel.</td>
        <td align="center">21.12%</td>
        <td align="right">21 / 30</td>
    </tr>

</table>
于 2013-02-22T11:04:41.127 回答