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

381 views 21 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