开发者

Highlight a table column + colspan

开发者 https://www.devze.com 2023-03-14 16:54 出处:网络
jsfiddle link: http://jsfiddle.net/KMzjp/ So I am trying to highlight a table column based on a table header th element (there are three th elements so there should be three columns and the middle on

jsfiddle link: http://jsfiddle.net/KMzjp/

So I am trying to highlight a table column based on a table header th element (there are three th elements so there should be three columns and the middle one highlighted).

It works without colspans. But when I add colspans to tbody (see the second table), it does not work as expected.

See the jsfiddle link to understand my problem better.

Any ideas how to solve this 开发者_运维技巧issue?


Changing the <colgroup> to the following (adding span="5") would do.

<colgroup>
    <col class="" span="5"/>
    <col class="highlight" span="5" />
    <col class="" span="5" />
</colgroup>


So easy. Good to know col has span attribute:

http://jsfiddle.net/FCTjB/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号