Forums

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

Good morning, Does anyone know how to center the macro result in a page or section?

Josée Dufresne December 11, 2023

I work with Confluence DC/Server, not Cloud.

I would like to know how to center my results?

HowCenter.jpg

HowCenter-Macro.jpg

2 answers

0 votes
Felix Linh
Contributor
December 11, 2023

I apologize for any confusion. If the above instructions are not producing the desired centering effect, let me try providing alternative methods or clarify the existing one. Here is another approach using the Confluence Data Center/Server editor, which is more tailored to your environment:

  • Edit your page: Navigate to the Confluence page you want to edit and click the "Edit" button.
  •  Insert a Section Macro: Click on the "+" icon in the toolbar or type "/" to bring up the insert dropdown menu. Type "Section" and click on it or press enter to insert the section.
  •  Insert a Column Macro within the Section: Inside the created section, again click on the "+" icon or type "/" and search for the "Column" macro. Insert it within the section.
  •  Center the Content: By default, the column content should be centered. You can add more columns for a multi-column layout, which may affect the centering, depending on your layout choice.
  •  Insert Your Macro within the Column: Click inside the column you just created and insert the macro whose results you want to center. This is done by once again clicking on the "+" icon or typing "/" to bring up the macros menu, then finding and inserting your specific macro.
  •  Adjust Column Width (if needed): Modify the column width by clicking on the inserted column macro and selecting the width as required. You can adjust it to 100% to use the whole page width, which will center the macro content horizontally.
  •  Preview and Publish: Preview the page to ensure your macro is centered as desired. If it looks good, you can publish the page to make the changes live.

Please note that the "width" parameter for the column might not be available in all versions of Confluence. If that's the case or these steps don't work as expected, the alternative is to use a "Div" macro provided by an add-on like Adaptavist Content Formatting Macros, or custom CSS styling if your Confluence instance allows it and you're familiar with CSS.
Using Div Macro (from the Content Formatting for Confluence add-on)
Make sure you have Content Formatting Macros (or a similar add-on that provides layout macros) installed.

  • Insert the "Div" macro onto your page.
  • Add a "style" parameter to the Div macro with the value "text-align: center;".
  • Place your macro inside the Div macro.
  • Save or publish your page to see the centered content.

 

Thank you,

Felix.

0 votes
Felix Linh
Contributor
December 11, 2023

Hi @Josée Dufresne nice to meet you here!

Please try below example:

Here's an example using the Wiki Markup (or you can use the visual editor):

{section} {column:width=50%} {your-macro-name:parameter1=value1|parameter2=value2|...} {column} {section}

 

If you prefer using the visual page editor:

  1. Click on the "+" symbol in the toolbar (Insert More Content).
  2. Choose "Other Macros."
  3. Find and insert the "Section" macro.
  4. Inside the section, insert the "Column" macro.
  5. Adjust the column properties if needed (e.g., width).
  6. Find and insert your intended macro inside the column.

I hope this  help you.

 

Thank you,

Felix.

Josée Dufresne December 11, 2023

I Felix,

Thank's, but it doesn't work....

HowCenter-MacroSectionColum.jpg

Felix Linh
Contributor
December 11, 2023

And then @Josée Dufresne I would like to know one thing.
I would like to know you are a developer , team or company because I am a full stack developer and worked US company remotely.  My contract was expired around 3 months ago so I am finding new job opportunity.  ;)

Josée Dufresne December 11, 2023

Malheureusement Félix, je ne suis qu’un simple utilisateur, essayant de me débrouiller du mieux que je peux. Êtes-vous au Québec, Canada ?

Felix Linh
Contributor
December 11, 2023

Thank you for your inform me the information and I am located in Philippines.

I hope to work with you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events