Reputation: 1160
When this below code is used in HTML and opened using a browser, the flexbox effects are what I want. But when I use the same code in QWeb, the output is different (the flex div is not divided into two sections).
<div style="display: flex;">
<div style="border: 1px solid #ccc; flex: 1;">
<p>Lorem</p>
<p>Ipsum</p>
<p>Dolor</p>
</div>
<div style="border: 1px solid #ccc; flex: 1;">
<p>Lorem</p>
<p>Ipsum</p>
<p>Dolor</p>
</div>
</div>
Browser
PDF Report
Upvotes: 1
Views: 2100
Reputation: 533
The problem is not qweb but wkhtmltopdf. You can try webkit-box as mentioned in Using Flex/CSS with wkhtmltopdf
<div style="display: flex; display: -webkit-box; -webkit-box-pack: center; justify-content: center;">
<div style="border: 1px solid #ccc; flex: 1; -webkit-box-flex: 1; -webkit-flex: 1;">
<p>Lorem</p>
<p>Ipsum</p>
<p>Dolor</p>
</div>
<div style="border: 1px solid #ccc; flex: 1; -webkit-box-flex: 1; -webkit-flex: 1; margin-right: 0;">
<p>Lorem</p>
<p>Ipsum</p>
<p>Dolor</p>
</div>
</div>
Upvotes: 1