Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I remove the unnecessary border when inserting a code block inside a table?

Shawn in Van
Contributor
June 4, 2018

Hello all,

Can anyone tell me how to remove the unnecessary border from a code block macro?  When the code block macro is inserted into a table, the border is redundant. 


A solution for either the regular code block macro or the better code block macro is acceptable.

I tried to set the css for the page, using the Style macro and many variations of:

div.xxxx xxxxx {
border-style: none;
border-width: 0px;
}

Nothing I tried worked. However, going into Chrome code view mode, I discovered that by setting:
border-width: 1px; to 0px
... on class="code panel pdl conf-macro output-block" works perfectly. 

Now, how do I translate that into a CSS page modifier?

Thank you

 

1 answer

0 votes
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.
June 4, 2018

Try this.


.confluenceTable .code {border: none !important;}
Shawn in Van
Contributor
June 4, 2018

Thank you Davin!

You're awesome. 

Why is the !important ?

Also, is it possible to do this for the {Better Code Block} macro? Either way, this is a success and I'm happy.

 

Thanks.

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.
June 4, 2018

This CSS just targets the built in code block. Unfortunately, you can't use CSS to do this with the better code macro because that macro is inside an iframe. The !important tells the browser to use this style above all cascades.

Shawn in Van
Contributor
June 4, 2018

Thank you. :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events