Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Tables: Support for multiple <tbody> #954

Closed
ledermann opened this Issue · 2 comments

2 participants

@ledermann

Because a <table> is allowed to contain multiple <tbody> to build groups of rows, it would be nice to style them with Bootstrap.

Example 1: Striped groups:

tbody:nth-child(odd) { background: #f5f5f5; }
tbody:nth-child(even) { background: #e5e5e5; }

Example 2: Placing a separator between groups:

tbody { border-top: 10px solid #ccc; }
tbody:first-of-type { border-top: 0; }

But both do not work nice with .striped-table. Any ideas?

Further reading:
http://stackoverflow.com/questions/3076708/can-we-have-multiple-tbody-in-same-table
http://stackoverflow.com/questions/294885/how-to-put-spacing-between-tbody-elements

@mdo
Owner

Added a 2px border to 2.0-wip.

@mdo mdo closed this
@ledermann

Thanks, but I think this is not a perfect solution when it comes to .striped-table. Please see this example:
http://jsfiddle.net/uW72U/

If a <tbody> contains an odd number of rows, the last row has the same background-color as the first row of the next <tbody>

@divtagged divtagged referenced this issue from a commit in egocreative/bootstrap
@mathiasbynens mathiasbynens Normalize short URLs pointing to GitHub issues
Ref. #954.
c93f45f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.