node-html-pdf
node-html-pdf copied to clipboard
Flex is not Wroking
I am using Flex for styling the html but it is not working in the pdf.
add this css
display: -webkit-box;
display: -webkit-flex;
-webkit-flex-wrap: wrap;
display: flex;
flex-wrap: wrap;
add this in package.json
"browserslist": [
"Safari >=4"
]
I found this answer from StackOverflow very helpful, just add -webkit
prefix to all your flex properties. I tried it out and it worked perfectly for me!
display: -webkit-flex; -webkit-flex-direction: row; -webkit-flex: 1;
You can use float instead of flexbox or grid.
already answered https://github.com/marcbachmann/node-html-pdf/issues/419
Thank you @rongliangduan @madhavkaneriya!!! Wasted 2 days :(
I'm using the grid but it is not working in the pdf also.