How can I define table headings in an existing table in Confluence 4.0?

Looks like someone didn't get the table heading feature in Confluence 4.0 and used highlighting instead. For someone like me who noticed the subtle difference between the two this is annoying. But I couldn't find another way to create the heading than to recreate the table. Is there another way?

2 answers

1 accepted

Hi Eirik,

I'm not sure if I fully understand the question, but the first row in a table inserted in Confluence 4 uses <th> tags whether the row is highlighted or not. If someone has removed the highlighting from the first row of a table you can add it again by placing the cursor in the first row of the table and clicking the "Highlight Row" button. All this is doing is changing the generated HTML from:

&lt;th class="nohighlight confluenceTh"&gt;

to:

&lt;th class="confluenceTh"&gt;

So you can toggle the highlighting on and off and it still uses <th> tags for the first row rather than <td> tags without having to recreate the table.

All other rows in the table use <td> tags and if you delete the first row completely and reinsert it will use <td> tags.

Hope this helps,

Andrew.

Thanks for the info, the <th> tags was part of my worries wrt exporting the page to a file.

Still, highlighting the first row made the text dark blue which is normal for highlighting. If the table is created with a heading the text is black (and bold), although the shading is the same. Since I noticed it looks like headings and highlighting are two different concepts, but only the higlighting can be changed back an forth.

If you're seeing a visual difference between table headings and highlights it sounds like you're overriding stylesheets at either the space or global level. On a vanilla install the CSS for both a highlighted <th> and a highlighted <td> is the same:

color: #000000;
background-color:#F0F0F0;
font-weight:bold;

Is there anything defined in Browse -> Space Admin -> Stylesheet or Browse -> Confluence Admin -> Stylesheet that is overriding table.confluenceTable td.confluenceTd.highlight or table.confluenceTable th.confluenceTh ?

Nope, nothing is defined in either place. And the install is pretty fresh and we haven't touch the styling. Are you sure about the CSS? I don't see anything strange about displaying the headers differently from highlight.

Think I'll ask the one who made the table in the first place. Can't really reproduce the thing.

What I meant was if you're using the "Highlight Row" button in the editor and it's doing something other than black, bold text with a shaded background then someone may have overriden the CSS, but if there's nothing in the Space or Global stylesheets then that's not the case.

Whoever made the table may just have selected the rows in the table and used the colour picker in the editor to change the colour of the font.

Perhaps. Maybe it was a bit unclear, but highlighted rows always have dark blue text, not black. It is the only thing I have observed, it has never been identical.

Still unanswered. Don't think it is a big deal since you can't (to my knowledge) create a table without the heading row. It is possible to delete the row, but then you are stuck with highlighting to make it a heading again. And it is not the same.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

561 views 20 11
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you