Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in repeated table headers are broken #387

Closed
naringas opened this Issue Nov 10, 2016 · 1 comment

Comments

2 participants
@naringas
Copy link

naringas commented Nov 10, 2016

I have a table with a table header (thead) which contains images (as icons).
Whenever the whole table is longer than one page, the image inside the thead on the first page breaks.

page 1:
screen shot 2016-11-10 at 2 19 49 pm

page 2 (correct):
screen shot 2016-11-10 at 2 19 55 pm

screenshots made with the following example (adjusted so it breaks through to a second page)

<table>
  <thead>
  <tr>
    <td style="border: 1px solid black;"><img class="inline-logo" src="http://pas-bplans.s3.amazonaws.com/styleguide/images/compressedLogoColor.png"></td>
  </tr>
  </thead>
  <tbody>
   <!-- repeat next line until it's longer than one page -->
   <tr><td>a</td></tr>
  </tbody>
</table>

tested on mac os X (El capitan) with weasyprint 0.31
also tested on git cloned weasyprint

@naringas naringas changed the title table header (thead) images break on first page table header (thead) with images breaks image's alginment on first page whenever the whole table spans more than 1 page Nov 18, 2016

@liZe liZe changed the title table header (thead) with images breaks image's alginment on first page whenever the whole table spans more than 1 page Images in repeated table headers are broken Nov 24, 2016

@liZe liZe added the bug label Nov 24, 2016

@liZe

This comment has been minimized.

Copy link
Member

liZe commented Nov 28, 2016

I've tried to debug, but that's surprisingly hard to find the real cause of this issue. It's caused by collapsing margins for sure, but I didn't find why it only happens with images (it works fine with other contents).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.