The {style} macro doesn't seem to work

This is my test page

{style}
ppp{
text-align: center;
color:#FF0000;
font-size-adjust: 2;
}
{style}


* this doesn't work:
{span:style=ppp} Hello world{span}


* this (sort of -- text-align property doesn't) works :



{span:style=color:#FFF000; font-size-adjust:2; font-family:serif; text-align:center } Hello distinguished citizens of the world {span}

Can anyone explain why the style macro isn't working?

2 answers

1 accepted

2 votes
Answer accepted
David Simpson Community Champion Jul 25, 2011

Likely you need to do this instead:

{style}
.ppp { /* the dot/period denotes a class selector */
text-align: center;
color:#FF0000;
font-size-adjust: 2;
}
{style}
{span:class=ppp} Hello world{span} 

Yep, that should do it - not the 'class' parameter for {span} also, very important! :)

Sorry, but I don't understand this comment -- would you clarify?

Is it possible to do this in Confluence 4.0 still? I am not able to currently.

That will depend on if Adaptavist has released their update for the Complex Formatting Plugin. Check with them is my suggestion.

Your changes worked -- I was following an example (that I can no longer find).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,192 views 2 13
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