How do you make table borders disappear?

Karie Kelly
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.
May 28, 2014

Prior to the RTE, we could create tables but with no borders. We used this often in order to assist with the documentation formatting (e.g. put an image in the first column and explanation/description in the second column). This ensured the images and text were aligned. You cannot ensure alignment when using sections/columns.

There is no option in the RTE for the table borders to be invisible (:-( given this is a common option for other table RTEs). Does anyone know how to do this so it remains editable? I don't want to use wiki markup becaues it just converts to RTE and you cannot edit it in markup going forward.

Appreciate the advice.

1 answer

1 accepted

3 votes
Answer accepted
Davin Studer
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.
May 28, 2014

Here's what I would do. I would create a user macro that can override the style on any tables inside the macro body. Here is an example of a user macro for this. Just add the macro and then put a table inside the body. Voila! No border.

Macro Name:
no_table_border

Macro Title:
No Table Border

Macro Body Processing:
Rendered

Template:
## Developed by: Davin Studer
## Date created: 05/29/2014
## @noparams

<style>
.notableborder table.confluenceTable, .notableborder table.confluenceTable td, .notableborder table.confluenceTable th {border: 0;}
</style>
<div class="notableborder">$body</div>

Karie Kelly
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.
May 28, 2014

Davin,

Thank you for that suggestion. How do you thn actually put the table inside? I created the macro and inserted it. Once you have a macro, you cannot use any of the RTE (e.g. I could not insert a table). I tried inserting the actual tags around an existing macro in the source, but that wouldn't render the table at all. I tried to insert markup for a table - again, it was blank.

I would never get a table to actually be inserted inside the macro and displayed in the UI.

Any ideas?

Davin Studer
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.
May 28, 2014

Oops! The Macro Body Processing should be Rendered not Unrendered.

Karie Kelly
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.
May 28, 2014

That makes sense, Davin.

The UI is rendering great without the borders using that solution. Do you know what I need to put in the PDF Stylesheet for the export to apply the same logic for how it is displayed in the UI?

Karie Kelly
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.
May 28, 2014

The solution worked perfectly !!!! Thank you very much!

Davin Studer
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.
May 28, 2014

If you put this into the PDF stylesheet stylesheet it should remove the borders.

.notableborder table.confluenceTable, .notableborder table.confluenceTable td, .notableborder table.confluenceTable th {border: 0;}

Davin Studer
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.
May 28, 2014

No problem. Glad to help.

Milo Test
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.
August 1, 2016

Davin, you've saved me again! My new employer uses Confluence cloud, but your solution still works:

  1. Put the table in a Div macro and set the Style field to notableborder.
  2. Add the CSS macro and put the above code in it.
  3. (Optional) Add the above code to the PDF Stylesheet.
Karsten Knecht
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 15, 2016

Davin, thank you very much.

Found this solution today and it solved exactly my problem. 
BTW: Really strange that Atlassian can't hide cell borders out of the box. 

Like Kim Wallace likes this
Jim Heddles
Contributor
May 15, 2019

I also just found this solution and it also exactly solved my problem.  THANKS>

Michelle Rau HP
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.
May 19, 2021

I was able to use this information to create a CSS stylesheet for a page and it worked perfectly. Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events