Lets'say I've got a page

<apex:page renderAs="pdf" applyBodyTag="false" applyHtmlTag="false" showHeader="false">
        .testTable {
            border-spacing: 50px 1px;
            border : 1px solid red;
        .testTr  td {
            width: 50%;
            text-align: center;
            vertical-align: bottom;
            border: 1px solid red;
    <table class="testTable">
            <tr class="testTr">

But I've got in my opinion strange result Result What am I doing wrong?

  • 6
    you have to use <head> instead of <header> Commented Jan 29, 2020 at 14:01
  • 2
    @PhilW Not true, you just have to do it right.
    – sfdcfox
    Commented Jan 29, 2020 at 14:11
  • 5
    @PhilW There's ... no documentation I'm aware of. A lot of what we've discovered came from exploring the documentation for Flying Saucer. For example, we know that CSS2 is only partially supported, and CSS3 isn't at all. So basically you have to write your pages like it's 1996 (or so). A perfectly well-formed HTML document will apply the CSS correctly. If you have a specific example you'd like fixed, you could ask a question, I'd be glad to point you in the right direction.
    – sfdcfox
    Commented Jan 29, 2020 at 14:19
  • 1
    In my case - it was my mistake with <head>. Css works fine
    – pincet
    Commented Jan 29, 2020 at 14:23
  • 2
    @sfdcfox thanks for the info. Useful to know. Now I am aware it is partial CSS2 I can probably work out what the gaps were and work around them without "style" attributes. Great learning! Cheers.
    – Phil W
    Commented Jan 29, 2020 at 14:53

1 Answer 1


You have to use <head> instead of <header>.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .