Macros like Code Block and Info appear to always be aligned with the left margin, but I would like to indent them.
I have text that is formatted in indented paragraphs and I want to use the Info macro to highlight the next paragraph but it should keep the same alignment.
I am able to achieve something like this by defining a section and columns, but it feels like a hack. Are there other alternatives
Any solution will be "a hack" if you're styling the output of a macro that does not take style parameters. That being said, there are some ways to achieve this without being too invasive. The primary way I would do it is define a custom style in CSS for the macros that you want.
For example, insert a Code Block macro in your page and then view the output. You'll notice that it's inside the following div:
<div class="code panel">
As a result, if you add something like the following to your CSS, you should achieve proper indentation:
margin-left: 100px !important;
Make a panel macro around the macro to be indented, like this:
this is code block text
(Set Border Color to #FFFFFF or white.) However, that produces 0,5" or so too much space above the macro (and slightly too little indentation for my purpose). Are there any better solutions?
Indent macro does not allow macros inside. Could somebody please write an Indent1 macro that does allow macros inside and either an indentation parameter or spaces before the Indent1 macro? Or better, the two macros suggested here: https://jira.atlassian.com/browse/CONF-38096
Anyway, Atlassian should allow macros like Code Block or Page Tree appear within text. That way I'd just need to add some spaces before them to get the indent. (also mentioned in https://jira.atlassian.com/browse/CONF-38096)
Working off @matthew's suggestion, I have found that just doing a DIV with an inline style works for me.
<div style="margin-left: 30.0px"> <codeblock> </div>
P tags with the same style around code macros get stripped when saving your changes but the DIV tags don't. At least not yet...that may change or your mileage may vary.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs