Table seems to automatically create a 'thead' around the first 'tr'

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2015

When I create a table with the editor with the head elements on the left side, Confluence seems to render a thead element around the first table row.

I think this is a fault since the td elements of the first row do not belong to the head.

Here is an image to show my problem:

table-thead.png

We are using Confluence 5.8.9.

Do I miss something here? Is it semantically legal HTML? Can I suppress the generation of the thead element?

2 answers

1 accepted

1 vote
Answer accepted
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2015

Hi,

interesting question, but, honestly, I really don't think confluence is the kind of tool that you would expect to create clean code. I never bothered to really check for validity but I know that I have had numerous cases where I was struggling with strange kinds of code soup.

Anyways, if you really want to know for real check with the validator or read about the tr specification.

And perhaps you find it interesting that with my 4.3.7 version it is all different and it does not add a <thead> (but a useless <br>). So much about consistency!

2015-09-04 11_31_59-Bearbeiten - The Real Test - Steffen Heller - Lightweb.png

 

 

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2015

Hi Steffen, thanks for your reply! This is indeed interesting! I checked it with 5.8.1 (which has the 'bug') and 5.5 .7 (which hasn't). I had a look at the spec and it is legal to have tds within the trs of a thead. I'm still hoping to get an answer to the workaround part or a statement if this is a bug that may has to be fixed ... Thank you so far!

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2015

Why is it important to you to get rid of the <thead>?

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2015

We use an add-on that applies styles via CSS to the td inside the thead (you can see it in the first screen shot). While I created a workaround in our side-wide quirk-CSS, I realized that the root cause is in the application of the thead tag. So I thought if someone has an idea to get rid of that ... :)

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 6, 2015

I don't think you will get a chance to get rid of the <thead>. If you want to try to solve it with CSS, try something like wiki-content .table-wrap table.confluenceTable thead tr td { ... } But remember: Without really searching for we have already stumbled across a few possible problems (your own doubts about validity, underlying code that can change from time to time and from version to version, useless code fragments that are automatically added...)

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2015

I assume that there will be no official reply to the table structuring problem. Therefore I close this question.

1 vote
Kelli Hoyt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2015

Users of Brikit Theme Press:

Theme Press is indeed applying styling because of the <thead>.

We have created a ticket for this in our support system, which you can follow here: https://brikit.atlassian.net/browse/PRESS-1411 

You can also find details on the ticket for a patch for your theme, until we get that in the product in a next release.

cheers,

Kelli

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2015

Hi Kelli, thank you for your reply! The URL is protected, but I recognize the ticket my colleague raised ... ;) Nonetheless I suppose that the root cause of the problem is on the side of Confluence: It assumes my first table row to be a header, but in fact it isn't. Once the the 1411-ticket is closed, the problem is at least no longer visible! :) Cheers, Robert

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events