Forum How do I...?

display: flex; justify-content: right doesn't seem to work

gopireddy
Please see the attached HTML file. The generated PDF shows the logo on the left while the HTML shows it on the right. Suggestions?
  1. test.html0.7 kB
    html shows logo on the right
  2. test.pdf7.5 kB
    pdf shows the logo on the left
howcome
In your code, you write "justify-content: right". Personally, I like intuitive values like "left" and "right", but they are not part of the specification:

https://www.w3.org/TR/css-flexbox-1/#justify-content-property

Prince follows the specification, as documented here:

https://www.princexml.com/doc/css-props/#prop-justify-content

The solution is to use this code:
justify-content: flex-end
  1. test.html0.6 kB
  2. test.pdf25.1 kB

Edited by howcome

gopireddy
Thank you.