question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Printing long tables causes repeated header to overlap with content

See original GitHub issue

I checked that…

  • … the documentation does not mention anything about my problem
  • … the problem doesn’t occur with the default MkDocs template
  • … the problem is not in any of my customizations (CSS, JS, template)
  • … there are no open or closed issues that are related to my problem

Description

When printing tables that are longer than 1 page, the header is repeated but overlaps with the content.

Expected behavior

Repeating the header is fine, but it should not overlap with content.

Actual behavior

It’s overlapping:

image

Steps to reproduce the bug

Insert a long markdown table into a page and go to File > Print and look at the print preview.

I made a reproducible, minimal example. View it with:

git clone git@github.com:timvink/mkdocs-print-site-plugin.git
cd mkdocs-print-site-plugin
git checkout 7d787b5902cabbcf3c5cf9ffce85e64eb150b2fd
mkdocs serve -f tests/fixtures/projects/tables/mkdocs.yml

Package versions

Python 3.7.4 mkdocs, version 1.1.2 Material Version: 5.5.12

System information

  • OS: MacOS
  • Browser: Chrome

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
timvinkcommented, Sep 22, 2020

Works in MacOS / Safari

image

And in MacOS / Firefox there is actually a different issue, where the table is cut-off and limited to only 1 page:

image

0reactions
squidfunkcommented, Sep 23, 2020

Released as part of 5.5.14.

Read more comments on GitHub >

github_iconTop Results From Across the Web

THEAD is overlapping with page contents on Print page headers
I found this worked for me, but the thead is only displayed on the first page: @media print { thead {display: table-row-group;} }....
Read more >
621258 - Table printing: thead overlaps content if combined ...
Issue 621258: Table printing: thead overlaps content if combined height ... This is only a problem if repeating table headers are enabled.
Read more >
Repeat Item Table Header Overlap - Bug - ERPNext Forum
I try adding this to css custom print format properties, it's make better but the table header not repeated thead { display: table-row-group ......
Read more >
Problem with document table 'header rows' when they overlap ...
If a document table 'header row' that has at least one cell with text that extends to more than a single line (i.e.,...
Read more >
[Html2PdfConverter] Overlapping column header and content ...
If you want to prevent your table header to be repeated on other pages, you should apply the following CSS styles on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found