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

inline-block elements taller than page get clipped #164

Closed
iabw opened this issue Feb 1, 2014 · 3 comments
Closed

inline-block elements taller than page get clipped #164

iabw opened this issue Feb 1, 2014 · 3 comments

Comments

@iabw
Copy link

iabw commented Feb 1, 2014

A block will clip off the bottom of the page once it no longer contains "real" content ( f.e., an element with a height of 3000px, but no child elements ). This in itself seems slightly problematic and you're already aware of, I believe.

However, an inline-block will clip even if it has valid content, once it's taller than the page. It also seems to add a blank page before itself?

Since floats and tables don't cross page boundaries, this seems to make it impossible to have a column layout with a column taller than a page. I assume I'm doing something wrong, since no one else seems to have this problem...

I was having this problem on a "real" page, with 2 columns, one of which is very tall. I reduced it to the following reproduction:

An example pdf with a block with a set height of 3000px, and enough text to go onto 3 pages.
block

The same block flagged as an inline-block only shows one page of Text before clipping.
inline-block

Here's the html for this test -

<div>

    <div style="    /* display: inline-block; */  width: 70%;   height: 3000px;    background: blue;">

        <div style="height:10px;">Text</div> <!-- repeat a couple hundred times -->

    </div>
    <div>Text here</div>
</div>
@SimonSapin
Copy link
Member

Page breaks are not supported inside inline-block, for the same reason they are not inside floats, abspos, and table cells: WeasyPrint only knows of one "flow" at a time when doing a page break. Yes, that probably means that WeasyPrint right now can not do multiple-column layout across pages.

@iabw
Copy link
Author

iabw commented Feb 1, 2014

Okay, thank you. That makes sense, it just wasn't what I thought the situation was.

@liZe
Copy link
Member

liZe commented Aug 14, 2015

Duplicates #36.

@liZe liZe closed this as completed Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants