java-html2image
java-html2image copied to clipboard
The HtmlImageGenerator is ignoring the horizontal aligments of two divs.
Hello,
Is there any way around this?
I have tried display: flex, display: inline-block, float: left.. etc
All of them are being ignored and when the image is generated, the
For example:
Expected:
Result:
Not that I'm aware of. If you can supply a fix, I'm more than ready to merge it in.
I've tried the following code and it's working as expected, at least with my forked version
if you want to try it you can use jitpack.io to include it as a Maven dependency
<!DOCTYPE html>
<html>
<head>
<style>
.container {
background-color: DodgerBlue;
}
.container > div {
display: inline-block;
background-color: #f1f1f1;
margin: 10px;
padding: 20px;
font-size: 30px;
text-align: center;
}
</style>
</head>
<body>
<h1>Inline Block divs</h1>
<div class="container">
<div style="width: 32px">1</div>
<div style="width: 64px">2</div>
<div>3</div>
</div>
</body>
</html>