How to Connect PDF Stylesheet to HTML in HTML Macros in Confluence

Sean Duff January 12, 2022

We will need a stylesheet in order to style some things on our Confluence page that cannot be otherwise created with inline styles i.e. hover effects and overlays. 

Currently, when I create a class within an HTML Macro and then define the styles for that class in Space Tools > Content Tools > Look and Feel > PDF Stylesheet, nothing happens.
 stylesheet-pdf-01.png

I also tried to create an internal stylesheet within the html macro and this did not work either and in-fact it broke the page:

html-macro-html5-01.png

How can I connect the PDF stylesheet with the HTML Macros on our page? Or is there any other way to import a stylesheet that syncs with the classes within HTML Macros? I'm pretty sure we're on the Confluence server. 

Thanks

1 answer

1 vote
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2022

@Sean Duff If you are on Confluence server you can configure your instance to allow for custom CSS per space.  Follow the instructions here: https://confluence.atlassian.com/doc/styling-confluence-with-css-166528400.html

If you have a style you would like to apply to your confluence instance you can do it by adding it to General Configuration > Custom HTML and add the style to the Head section.  

Sean Duff January 12, 2022

As for the instructions article, I have tried the first method - to edit a space's CSS style sheet. The styles simply do not display.

I've not yet tried to edit the global stylesheet, because I don't see the 'gear' icon anywhere in the interface. Looks like you need to click on a gear somewhere in order to go to General ConfigurationStylesheet. I wonder if the reason why I'm not seeing the gear icon anywhere is due to a permissions issue? I've been given administrative access, as far as I know - but maybe I still don't qualify as a system administrator (?)

Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2022

@Sean Duff If you are a space admin you will not be able to view general configuration.  If you are a Confluence admin it will be presented as an option.  I would suggest talking to your admin and they will be able to help you.

Like Sean Duff likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events