[whatwg] multiple <tbody>s in <table>

Ian Hickson ian at hixie.ch
Mon Apr 27 18:40:18 PDT 2009


On Thu, 19 Mar 2009, ddailey wrote:
>
> I recall a while back trying to figure out how to style columns of a 
> complex table that occured below the nth row of a table. I discovered 
> that if I just used <col style> and moved those <col>'s down to the 
> appropriate row, IE was okay with that and did what I wanted but the 
> other browsers not only didn't but became very upset with me.
> 
> So instead, I created multiple <tbody> tags and applied the styling cols 
> just before the second <tbody>.
> 
> It rather worked (or at least it did for most web users). Nowadays, the 
> trick still seems to work in IE, but causes just as much problem in 
> other browsers (and maybe a wee bit more) as it used to.
> 
> I gather from my cursory look at the treatment of <table> and <tbody> in 
> HTML5, that my legacy content should be resuscitated in HTML5. Am I 
> correct in thinking that <tbody> will function sort of like <colgroup> 
> but for rows instead of columns and that applying separate styles to 
> different <tbody>s in a table will be the way to do things in the spec?

Yes, though this is not a change from HTML4 and shouldn't result in 
implementations changing from what they do today.

Generally speaking, I think we need more control over table styling from 
CSS to adequately handle the case you describe.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list