How to apply CSS to the Expand macro

I understand how to apply CSS stylesheets to a space, but how can I reference the Expand macro objects in the stylesheet?

I have a list of hyperlinks, some of them are just direct URL hyperlinks and others are Expand links (that open up to expand a sub-list of URL hyperlinks). However, when you put a mixture of those right after another, the format looks awful. I think this is because the Expand macro has a different margin setting and so the spacing right after it is different than if it were just a regular <p> object. Any ideas???

To better visualize, here's an example of what I get right now:

And here's what I would like to have:

3 answers

1 accepted

0 votes
Accepted answer
Davin Studer Community Champion Jul 31, 2014

You could give the expand-control class a 10px margin-top. That should fix it for you. It currently has a 10px margin-bottom, and p elements have a 10px margin-top and no margin-bottom. That is why they butt up against each other. You could add it to either the space or global stylesheet, or if you only want it on one page you could use the Content Formatting Macros stylesheet macro to put a style block in your page.

.expand-control {
    margin-top: 10px;

That helps, thank you.

0 votes
Davin Studer Community Champion Jul 16, 2014

If you are using a fairly modern browser they all come with developer tools that allow you to look at the source and css styles for specific elements. That would be the place to go to see what is going on. Also, you may look at the storeage format for the actual page to see if the wysiwyg editor did something wonky. The Confluence Source Editor will let you peek into and edit the storage format.

Never really found a good way to do this.... closing this question since I'm not getting any other answers.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

486 views 3 18
Read article

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