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

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

Shawn in Van 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
Christo Mastoroudes [Adaptavist]
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 5, 2018

There are a few ways that you can do this, but It sounds like you have Content Formatting for Confluence installed since you mention the Style macro. If this is the case follow the steps below.

The idea is that If you add your table with code block inside a div macro with a unique class, then you could target just your code block and not affect other code blocks.

 

1. Add a div macro to the page and give it a unique class name for example "my-unique-class-name" by editing the macro and entering the parameter.

2. Add your table containing the code block inside of the div macro.

3. In the style macro add the following:

.my-unique-class-name .code.panel.pdl {
border: none;
}

 

This should have the result of only changing the code blocks inside your specific div macros.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events