Custom CSS on a page in Confluence Cloud

kraken
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2018

I am trying to get inline CSS working by following the steps below and is NOT working. 

  1. Create a new page
  2. Add a Style macro with css as the media and nothing in import
  3. Inside the style block, add the following content:

           .test {

             font-size: 100px;

             color: red;

            }

       4. Add markup content below the style section on the same page

            <div class="test">

                 Hello World

             </div>       

 

After this, I publish and do not see my CSS applied. I am using confluence cloud. I am wondering why this is not working.

2 answers

1 vote
YG
Contributor
March 14, 2022

I know this is old, but has any progress been made on custom styles?

0 votes
Divya K. V.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2018

Hello @kraken

The style macro looks to be deprecated now, as discussed here - https://confluence.atlassian.com/confcloud/we-re-cleaning-up-the-macro-browser-946028471.html

Also it is no longer listed in the macro browser. The above post will also give you pointers on how to use the editor for different formatting needs.

Hope this helps and let us know if you have any further questions.

kraken
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 13, 2018

Thanks for the confirmation. So, what are the alternatives to build a page with custom CSS? How would I make the example above work? I don't see Style in the grid. What are the alternatives for it?

Thanks.

Alan Jiménez
Contributor
September 24, 2019

I was able to add a style macro to a wiki page as initially described in this thread, ie. the style macro has not been removed from the list of macros available (we also do have cloud Confluence).

No, it does not show in the initial list of macros from the drop-down menu in the editor, but pressing on "Other macros" and searching CSS, it shows up, and you get to insert it.
I find it VERY confusing that the option for adding the thing is there, it just does not work. This is the case, right?

Is Atlassian aiming to remove all types of CSS customizations in their cloud Confluence? (I also tried to put ”{style}" entries in headers or footers, which works, but then I get a big fat warning on my wiki pages).

I think I'm just confused about what the situation is altogether. Would you like to provide this possibility, then do it. If you don't want to provide this possibility, then remove all these hints that it might be possible in some way.

Please be clear! Which is it? I'm wasting a lot of time trying to find a solution.

Thanks

/Alan

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events