Show heading 1 in Custom Header?

Hi Confluence,

Is there CSS that allows a Confluence page's H1 to display in the header (Enter Custom Header)? Sure makes long, exported PDFs easier to read...

Thank you,

--Julie

3 answers

Yes, there is. This CSS displays h1s in the top-center position of the header:

h1 {
position: running(header1);
}
 
@page {
@top-center {
content: element(header1);
}
}

But I doubt it will be easy to read.

With this the h1 headlines are moved (not copied!) from the page to the header and so it is hard to tell where on the page a new h1 chapter begins.

Thank you, Mary and Steffen. I will experiment and update the thread.

--Julie

I can duplicate Steffen's "move H1 headings to the header," but I am not able to modify it appropriately or use Mary's reference to the Print Stylesheet instructions to create an elegant running header. Has anyone online actually accomplished it?

Julie,

You should be able to modify the Print Stylesheet to do this in PDF

https://confluence.atlassian.com/display/DOC/Customising+Exports+to+PDF

Mary

@Julie:

What have you tried? Have you defined your formats with

h1, h2 {
/* define color, size, etc. here */
}

Doesn't that work?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,716 views 25 10
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