Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Redirect
filename
locationhttps://docs.meta-inf.hu/content-exporter/user-guides/before-export/custom-stylesheets/custom-stylesheet-examples

Here you can find some example stylesheets to format the document

Table of Contents

Don't set body and HTML height to 100% in stylesheet if you are using cover pages. Set it to 99% instead.

Formatting header

You can format bold texts by referring to the header HTML element.

For example, this code changes the colour of header1 to red and header2 to blue;

Code Block
h1{
 color:red;
}
h2{
 color:blue;
}

Formatting text

You can format bold texts by referring to the paragraph HTML element.

To change the text align to justify, include this in the stylesheet:

Code Block
p{
 text-align:justify;
}

or to strike through a text, use this:

Code Block
p{
 text-decoration:line-through
}

Formatting bold text

You can format bold texts by referring to the strong HTML element.

For example, this code sets the colour of the bold texts to blue:

Code Block
strong{
 color: blue
}

Setting page size (PDF only)

Setting the page size you can use the '@page' rule.

You can use absolute values:

Code Block
@page {
Code Block
  size: <width> <height>;
Code Block
}
Code Block
Or you can use the paper size name:
Code Block
@page{
Code Block
  size: A4;
Code Block
}

All Confluence pages to a new page(PDF only)

Code Block
h1{
Code Block
  page-break-before:always
Code Block
}

note this makes an empty page before the first page also.

Page Bottom Macro

Use the page-bottom CSS class to format the Page Bottom Macro:

Code Block
languagecss
.page-bottom{
  border: 1px solid red;
}

Code Block Macro

To have line breaks in code block macro:

Code Block
languagecss
pre{
  white-space: pre-wrap;
}