Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Export to PDF and headers Edited

Hi,

I used a pretty clean PDF export style-sheet including some numbering and formatting of headers ;

...

/* Title */
h1 {
text-align: left;
font-size: 24pt;
font-variant: small-caps;
font-weight: bold;
padding: 200px 0px 0px 0px;
}

/* Add numbering to section headers h2 to h4 */
body {counter-reset: h2}
h2 {counter-reset: h3}
h3 {counter-reset: h4}
h4 {counter-reset: h5}

h2.ncount:before {content: normal}
h2:before {counter-increment: h2; content: counter(h2) ". "}
h3:before {counter-increment: h3; content: counter(h2) "." counter(h3) ". "}
h4:before {counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4) ". "}
h5:before {counter-increment: h5; content: counter(h2) "." counter(h3) "." counter(h4) ". " counter(h5) ". "}

/* Page break before main sections */
h2 {
font-size: 20pt;
page-break-before: always;
page-break-after: avoid;
}

h3 {
font-size: 14pt;
page-break-after: avoid;
}

...
 

 But since Confluence 6.13 headings are not demoted anymore.

I updated my CSS for my headers to start at h1, but how do I specify a different format for the title?

I tried to differentiate the title using #title-text and/or .title-heading, without success.

In the mean time, exported PDF with an empty style-sheet clearly shows a difference between page title and Heading 1. So their is a way to do it.

Anybody with an idea, a copy of the default CSS applied, or some instructions?

 

2 answers

1 accepted

0 votes
Answer accepted

Here is a work around : 

...
/* Title */
h1:first-child {
    text-align: left;
    font-size: 34pt;
    font-variant: small-caps;
    font-weight: bold;
    padding: 200px 0px 100px 0px;
}
...

And here is another one, maybe "cleaner":

...
/* Title */
h1.title-header {
    text-align: left;
    font-size: 34pt;
    font-variant: small-caps;
    font-weight: bold;
    padding: 200px 0px 100px 0px;
}
...

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

342 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you