Html Colspan 不能在引导表上工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14831742/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Colspan not working on bootstrap table
提问by Jacques Bronkhorst
I have a nested bootstrap table
and I want colspan
to work on it, but it does not seem to work.
我有一个嵌套的引导程序table
,我想colspan
处理它,但它似乎不起作用。
At the end of the day, I would like to end up with something like this:
在一天结束时,我想以这样的方式结束:
____________________
| Col1 | Col2 |
|--------------------|
|This is data I want |
|--------------------|
| Col 1 | Col 2 |
----------------------
I created this fiddleto demonstrate the full functionality.
我创建了这个小提琴来演示完整的功能。
回答by Gericke
回答by Angela
As G-Man mentioned, you need to have the outermost td
to do the colspan
. The inner table actually does not need any colspan
as follows. Although, I don't think it would be a good idea to nest table
within a table
, but it's really up to you depending on the situation. Fiddle Updated
正如 G-Man 所提到的,你需要最外层td
来做colspan
. 内表实际上不需要任何colspan
如下。虽然,我认为嵌套table
在 a 中不是一个好主意table
,但这取决于具体情况。小提琴更新
<td colspan="7">Some Content Here</td>