Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to add styling to the table?

Priya Patel July 13, 2021

How to add styling to the table? I created table in my confluence page now want my table borders to be thick & black color by default it is showing grey.

 

1 answer

1 vote
Bill Bailey
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.
July 13, 2021

Not sure if you are on cloud or server. If you are on cloud, you have no options. If you are on server, you can update the site/space CSS to restyle all tables. If you want to style a single table, then you will need to create a user macro to insert the table into, and then style that table with CSS.

Erik Anderson July 27, 2021

Meanwhile, I've discovered that it is possible to use the <> "View Source" view to see and directly edit the XHTML of the page to add custom inline CSS.  This even renders correctly.  B̵u̵t̵ ̵i̵t̵ ̵t̵h̵e̵n̵ ̵v̵a̵n̵i̵s̵h̵e̵s̵ ̵o̵n̵ ̵s̵a̵v̵e̵.̵

Update:

I've explored a bit further.  Here's the inline CSS that Confluence keeps:

 <col style="width: 30.0px;"/>

Here's the additional CSS I added, shown in bold underline:

 <col style="width: 30.0px;border-left: 2.0px solid gray;"/>

This saves correctly just fine, and the column displays correctly with the expected 2-pixel gray border on the left side.  However, when anyone enters Edit mode on this same page, the additional inline CSS is stripped out.  Reverting to the published version maintains the custom formatting.

BUG:

It looks like Confluence is enforcing specific XHTML whenever a user enters Edit mode.  This is UNEXPECTED and UNWANTED.

When editing a page, the user should be presented with the page AS IT WAS SAVED, including any customizations introduced directly into the storage-format markup. 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events