table-cell - 某种colspan? [英] table-cell - some kind of colspan?

查看:135
本文介绍了table-cell - 某种colspan?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在有点困惑,因为我有CSS代码工作,但它不是很漂亮。我现在想重做这些CSS样式并通过LESS构建它们。我有很大的问题与 display:table; / display:table-row; 显示:table-cell; 。

I am a bit puzzled right now, because I had CSS code that worked, but it wasn't beautiful at all. I now want to rework this CSS styles and build them via LESS. And I have big problems with display:table; / display:table-row; and display:table-cell;.

例如,我有以下代码: http://jsfiddle.net/La3kd/2/

For example I have the following code: http://jsfiddle.net/La3kd/2/

如何做到最后细胞(中心)不会将上述第二个细胞向右移动?最后一个单元格应该具有以上2个单元格的宽度。需要某种colspan。这是如此奇怪,因为我有一个印象,它工作之前,我重新编写代码。

How can I do it that the last cell (center) does not shift the above second cell to the right? The last cell should have the width of the 2 cells above. Some kind of colspan is needed. It is so weird, because I have the impression that it worked before I reworked the code. But now all elements to the right are totally shifted.

推荐答案

CSS没有 colspan analog。

CSS has no colspan analog. Based on your example, you can just markup your last row as a separate nontably block.

您也可以使用 display:table-caption

You could also use display: table-caption in conjunction with caption-side: bottom to display table-row as last "row" that spans all columns. See live demo.

这篇关于table-cell - 某种colspan?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆