Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid the heading elements devotion on any page regardless level

Juan Andrés Rivas Rodríguez
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!
January 24, 2022

How do I explain this...

In order to PDF exportation, I just want to use the same size or style for all the Header elements (h1, ..., h6) inside a page of any level, but keep the demotion size between Page Title elements along the export tree.

 

I. e.:

Page (level 1) > Page Title (H1 - font-size: 3em)
                       > Header elements (H1 to H6) (font-size: 1.25em - same size always)

Page (level 2) > Page Title (H2 - font-size: 2.5em)
                       > Header elements (H1 to H6) (font-size: 1.25em - same size always)

and so on...

 

I've tried doing this:

h1, h2, h3, h4, h5, h6 {font-size: 1.25em;}

h1#title-text {font-size: 3em !important;}
h2#title-text {font-size: 2.5em !important;}
...

wich it works but doesn't in Confluence exportation to PDF (element#id)

 

I've also tried doing this:

h1:not(#title-text), h2:not(#title-text), h3:not(#title-text), h4:not(#title-text), h5:not(#title-text), h6:not(#title-text) {font-size: 1.25em;}

h1 {font-size: 3em !important;}
h2 {font-size: 2.5em !important;}
...

wich it works but doesn't in Confluence exportation to PDF (element:not(#id))

 

Any idea about how can I do this?
Thanks a lot

1 answer

1 accepted

0 votes
Answer accepted
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2022

Not sure I am clear on your use case, but you can't fix this with CSS, as there is no difference to H2 regardless what level it is at in the page hierarchy.

Unless you want to do programming, the only way I can think of getting close, is the format every heading on you Confluence pages as H1. 

OR you have to make all the headings the same, regardless of page level.

Juan Andrés Rivas Rodríguez
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!
January 24, 2022

This is exactly the alternative I had in mind in case of not getting so (always Title 1 - H1 headings inside a page, wich in other hand is the logic hieracy). In fact I've already updated that rule on my company's Guide of Writing and Formatting for Confluence Pages, and if I could change the non #title-text headings at will later on, its a rule that can coexist in any case.

Another battle is getting the team to follow it ;)

Sadly I'm not familiar with programming macros at all, and this would take too many resources for this particular issue.

Thanks a lot, Bill. Have a nice day.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events