How can I centre align the Livesearch macro?

Does anyone know how I can centre align the Livesearch macro? 

I've tried lots of different things in the Stylesheet, the source editor and the Custom HTML. None are working. Is it even possible to align this macro? At the moment it just drags itself over to the left and looks ridiculous on a nicely formatted page where everything is central.

 

 

3 answers

Have you tried using the section and column macros. You could create 3 columns, leave the left and right columns blank and put your search in the center. You can set the sizes for the column widths by percentages so you can make the center column small enough to just fit the search (say that was 20%) and then split the remaining percent between the left and right columns (in this example 40% each)

Just put the Livesearch macro in the body of a Div macro and add this to the Div macro's Styles field:

margin-left: auto; margin-right: auto; width: 18em

I don't really want to install more third party plugins as there is no guarantee they will be supported in the future... 

Okay, I was able to fix this. If anyone else is interested, I opened the Confluence Source Editor < > and created a new div class (call it whatever you want - I called mine "livesearch-centrealign":

<div class="livesearch-centeralign">
<ac:structured-macro ac:macro-id="1809e123-21d9-49e8-a2bc-278724a5bd6d" ac:name="livesearch" ac:schema-version="1">
<ac:parameter ac:name="spaceKey">
<ri:space ri:space-key="010000"/>
</ac:parameter>
<ac:parameter ac:name="placeholder">Can't find what you're looking for?</ac:parameter>
</ac:structured-macro>
</div>

Then under Space Tools > Look and Feel > Stylesheet:

.livesearch-centeralign {
margin: 0px auto;
display: inline-block;
}

with-additional {
height:auto;
padding-top:3px;
padding-bottom:3px;
text-align: left;
}

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

264 views 11 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