How can I centre align the Livesearch macro?

James Scott March 10, 2017

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

1 vote
James Scott March 13, 2017

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;
}

1 vote
Milo Test
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2017

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
James Scott March 10, 2017

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

1 vote
Sandy Johnson March 10, 2017

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)

Sindhu Bardipur September 18, 2019

It worked for me, thanks :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events