DOMPDF 中浮动的解决方法

发布于 2024-08-30 03:21:23 字数 595 浏览 2 评论 0原文

DOMPDF 不支持浮动

然而,我列出了很多表,它们主要是键和表。值对。我希望其中 2 个表格并排出现。

即如果我可以使用浮动

HTML

<table id="stuff">
...
</table>

<table id="other-stuff">
...
</table>

CSS

table#stuff {
    float: left;
}

table#other-stuff {
    float: right;
}

我可以采取什么样的解决方法来支持这一点?或者说这是不可能的?

如果有人有任何想法,可以在此处进行测试。

DOMPDF does not support floats.

However I am listing many tables, and they are mainly key & value pairs. I would like 2 of these tables to appear side by side.

i.e. if I could use floats

HTML

<table id="stuff">
...
</table>

<table id="other-stuff">
...
</table>

CSS

table#stuff {
    float: left;
}

table#other-stuff {
    float: right;
}

What sort of workaround can I do to support this? Or is it impossible?

If anyone has any ideas, there is a place to test here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

仙女 2024-09-06 03:21:23

看起来可能受支持在测试版中

您可以从下载该文件/code.google.com/p/dompdf/" rel="nofollow noreferrer">Google 代码页。

It looks like it may be supported in the beta.

You can download that from the Google Code page.

陈独秀 2024-09-06 03:21:23

制作一个包含 2 个单元格的表格(如果需要,则为 50%)。第一个向左对齐,第二个向右对齐。
在每个单元格中放置桌子。

它看起来应该像 2 个浮点数。

Make a table with 2 cells (50% if needed). Align 1st to left and the 2nd to right.
In each cell you place your tables.

It should look like 2 floats.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文