By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

Prevent Images from being Split

P: n/a
When there is a long image in the HTML it is being split over two pages
in the Print Preview rather than moving the image down to the next
page. Is there a way to get around this so the image will not be split?

Sep 13 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
re****@gmail.com <re****@gmail.comscripsit:
When there is a long image in the HTML it is being split over two
pages in the Print Preview rather than moving the image down to the
next page. Is there a way to get around this so the image will not be
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...

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Sep 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.