How do I change the size of the text in the header of an Expand macro?

I created a list of FAQs using the Expand macro and I would like to make the question larger. The macro does not accept HTML code.

How can I make the text in the question larger?

Thanks in advance!

1 answer

0 vote
Stephen Deutsch Community Champion Aug 10, 2017

If you want to change the size of the text headers of all expand macros in the page, then you can use the following CSS:

.expand-control-text {
font-size:130%;
}

You can put the CSS inside a user macro like this:

## @noparams
<style>
.expand-control-text {
font-size:130%;
}
</style>

or you could install the last free version of the Content Formatting macros and put the code in the CSS macro.

Thanks Stephen.  Where/how exactly do I insert this? My HTML code looks like this:

<ac:structured-macro ac:macro-id="0e3a1d40-31c9-4e5b-81a5-e101af9462d3" ac:name="expand" ac:schema-version="1">
  <ac:parameter ac:name="title">Question</ac:parameter>
  <ac:rich-text-body>
    <p>Answer </p>
      </ac:rich-text-body>
</ac:structured-macro>

Where can I find the css that this page uses?  

Stephen Deutsch Community Champion Aug 10, 2017

What you described in your comment is storage format, which is what Confluence stores in the background in order to generate your page. It is a form of XHTML, not actually HTML. HTML is what is shown when you are on a page and choose "View Source" in your browser. This is what the expand macro becomes once it is processed by the Confluence backend. This is what the CSS will affect. You can see this specific code by right clicking on the expand macro and choosing "Inspect".

If you have the HTML macro enabled, you can simply copy and paste this text inside:

<style>
.expand-control-text {
font-size:130%;
}
</style>

 and it will take effect on the page to increase the size of the expand macro header text.

Thanks very much Stephen, that worked fine!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

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...

2,351 views 25 10
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you