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

1 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

385 views 17 9
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