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

This widget could not be displayed.
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.
This widget could not be displayed.

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
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

564 views 7 6
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