TD合并单元格不工作的潮流与IDS [英] td colspan not working for tr with ids
问题描述
我有类似下面的表结构:
I have a table structure similar to below:
<tr>
<td colspan="5">
TEST
</td>
</tr>
<tr id="abcd_<?php echo $id; ?>" style="display: none">
<td colspan="5">
<span id="hidtb_<?php echo $id; ?>"></span>
</td>
</tr>
该表是一个循环和的$ id
的变化值的范围内。第二个 TR
设置为显示:块
使用JavaScript。但&LT; TD合并单元格=5&GT;
不包括所有5个&LT; TD&GT;
S,代替仅一个。。为什么我的合并单元格
不工作?
The table is within a loop and the value of $id
changes. The second tr
is set to display : block
using javascript. But the <td colspan="5">
is not covering all the five <td>
s, instead only one .. Why my colspan
is not working ?
推荐答案
这是问题显示:块
请参考以下链接 <一href="http://thedesignspace.net/MT2archives/000376.html#.UUrg3FfCd1u">http://thedesignspace.net/MT2archives/000376.html#.UUrg3FfCd1u
如果你是隐藏TR,然后使用显示:表行,而不是显示:块,以显示TR,
If you are hiding tr, then use 'display:table-row' instead of 'display:block' to display that tr,
如果你是隐藏TD,然后使用显示:表单元格,而不是显示:块,以显示TD
If you are hiding td, then use 'display:table-cell' instead of 'display:block' to display that td
使用表行,造型一TR时,没有堵。完美!
Use "table-row", no "block" when styling a TR. Perfect!
这篇关于TD合并单元格不工作的潮流与IDS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!