среда, 17 октября 2012 г.

Html Print - Prevent Images from being Split

Technically there is:

img { page-break-inside: avoid; }

On the other hand, browsers that tend to split images probably don't support
the page-break-inside property (which is generally poorly supported).

There's no good solution. You could say page-break-before: always for the
image, which is well-supported, but that would be an unconditional break. A
small change in paper size or formatting of preceding content (due to
something in a user style sheet, for example) could easily cause a natural
page break a little before the image, and then you would have a few lines of
text on a fresh page, then the page break you asked for...

Комментариев нет: