title: How to align text at the heading margin of a PDF, generated with Flying Saucer XML/CSS renderer
body: <p>I'm generating a PDF with the Flying Saucer 9.1.16 XML/CSS renderer, in a Spring Boot app. All the CSS properties are working fine, except <code>text-align</code> at the page margins. This is an extract of my CSS:</p>
  
  <pre><code>@page {
      size: landscape;
      margin-top: 100px;
      border-bottom: solid gray;
  
      @top-right{
          content: element(header-top);
          padding-top: 15px;
          text-align-last: end !important;
      }; 
  
      @bottom-right{
          content: element(pagination);
          vertical-align: top;
          text-align: right !important;
      };
  }
  </code></pre>
  
  <p>That's the HTML:</p>
  
  <pre><code>&lt;div class="header-center text-primary"&gt;
       &lt;h3 th:text="${ownerProperty}"&gt;&lt;/h3&gt;
       &lt;h4 th:text="${owner.ownerName}"&gt;&lt;/h4&gt;
  &lt;/div&gt;
  
  &lt;div class="pagination text-muted"&gt;
       &lt;small&gt;
           &lt;span  th:text="#{page} + '&amp;nbsp;'"&gt;&lt;/span&gt;
           &lt;span id="pagenumber"&gt;&lt;/span&gt;
           &lt;span  th:text="#{of} + '&amp;nbsp;'"&gt;&lt;/span&gt;
           &lt;span id="pagecount"&gt;&lt;/span&gt;
       &lt;/small&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>I have tried those two approaches, without success:
  <code>text-align-last: end !important;</code> and <code>text-align: right !important;</code></p>
  
  <p>I'm using Thymeleaf as template engine, and apart from my CSS, the PDF has this other one <code>bootstrap.min.css</code> linked .</p>