Loading
  • 21 Aug, 2019

  • By, Wikipedia

MediaWiki Talk:Gadget-StickyTableHeaders.css

But the real problem comes in when Chrome (or any standards-compliant browser) parses that HTML. Because the first row is made entirely of <th> cells, the browser wraps a <thead> around that row. The second row, being that it only contains body cells, goes into <tbody>. Which means that the <thead> and <tbody> are not discrete, because the middle cell occupies both. That's invalid. And since the gadget manipulates the <thead> block of the table, when it's enabled the rendering of that invalid structure breaks.

In the HTML, the table can be corrected by converting the <th rowspan=2> into <td rowspan=2>. When that's done, there are no longer any pure header rows in the table, so the table is parsed as having an empty <thead> and the entire structure in the <tbody>. That's perfectly valid, and displays correctly even with the gadget enabled:

<div class="