diff --git a/weasyprint/layout/tables.py b/weasyprint/layout/tables.py index dd0c3383..62a4d813 100644 --- a/weasyprint/layout/tables.py +++ b/weasyprint/layout/tables.py @@ -536,6 +536,10 @@ def auto_table_layout(context, box, containing_block): cb_width, _ = containing_block available_width = cb_width - margins - paddings + if table.style['border_collapse'] == 'collapse': + available_width -= ( + table.border_left_width + table.border_right_width) + if table.width == 'auto': if available_width <= table_min_content_width: table.width = table_min_content_width