Macros only align left

Mordechai Cikk July 24, 2017

I am trying to center align text inside a user macro. The other formatting works fine but center being ignored.

My latest attempte uses this:

<span style="color: #132840; font-size: 9px; text-align: center;">

some text

</span> 

 

Thanks all.

1 answer

1 accepted

0 votes
Answer accepted
Stephen Deutsch
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.
July 24, 2017

The span element defaults to the length of its content, not the container into which it is placed. If you want the length to match that of the container, then you have to use the div element. So if you change the content to:

<div style="color: #132840; font-size: 9px; text-align: center;">
some text
</div>

 Then it should work.

Mordechai Cikk July 25, 2017

As it does.

 

Thanks very much.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events