0

我们知道的是表格和第一列的总宽度。第 3 列和第 4 列必须适应内容,第 2 列必须使用其余空间。这第二列必须设置溢出隐藏,只允许一行或一行

也许小提琴更清晰

http://jsfiddle.net/favio41/9z867/

<table>
    <colgroup>
        <col class="col1" />
        <col class="col2" />
        <col class="col3" />
        <col class="col4" />
    </colgroup>
    <tbody>
        <tr>
            <td class="date">
                <span class="month monthAndYear">Feb</span>
                <br/>
                <span class="day ng-binding">21</span>
            </td>
            <td style="background-image: url(resources/img/categories/G0400.png);" class="category_icon cat_G0400">
                <span class="concepto ng-binding">This is a example of text</span>
            </td>
            <td>
                <span data-tooltip="Internet, teléfono fijo" class="cat-label cat-tooltip onlyTitle">
                    <span class="text ng-binding">Internet</span>
                    <span class="arrow"></span>
                </span>
            </td>
            <td class="importe">
                <span class="importe_value ng-binding">-33,23</span>
            </td>
        </tr>

        <tr>
            <td class="date">
                <span class="month monthAndYear">Feb</span>
                <br />
                <span class="day ng-binding">21</span>
            </td>
            <td style="background-image: url(resources/img/categories/G0400.png);" class="category_icon cat_G0400">
                <span class="concepto ng-binding">This is a example of text, but this is really big and we want to be hidden the last part because if is too big ...</span>
                <br/>
                <span class="descripcion ng-binding">This is a example of description text</span>
            </td>
            <td>
                <span data-tooltip="Internet, teléfono fijo" class="cat-label cat-tooltip onlyTitle">
                    <span class="text ng-binding">Internet</span>
                    <span class="arrow"></span>
                </span>
            </td>
            <td class="importe">
                <span class="importe_value ng-binding">-33,23</span>
            </td>
        </tr>
</tbody>

4

1 回答 1

0

在要溢出的单元格中放置一个 DIV。设置 DIV 的尺寸和溢出,而不是 TD。

于 2013-02-21T15:15:09.137 回答