Re: floats vs. page breaks

Rainer Åhlfors <rahlfors@wildcatsoftware.net> writes:

>> It seems reasonable to decide that it is not "possible" to position
>> a float in a place where it would be cut in half by a page break.
>
> Although I can see where you're coming from, your request is
> unreasonable.

I'm a bit confused as to what you think I am requesting.  I have _not_
made _any_ specific request, other than for comments and suggestions
for any alternate way of getting the desired effects.  Therefore I
find it quite strange that you consider my request "unreasonable".
Why is it unreasonable to ask for comments or suggestions of alternate
ways of getting the desired effects?

"drop caps" are something many people want to do.  The CSS standard
currently recommends a way of handling drop caps that is not
guaranteed to work at all when printing.  Also, there seems to be no
way of handling drop caps or effects that need typesetting similar to
drop caps.  Using floats for this kind of typesetting can always fail
(given the current CSS standards) because the float can be moved to
the next page.

> What if the paged media is 100px long, and your float is 120px? Now
> it will not print at all. Or will it? Well, that entirely depends on
> what we mean by "page break".

I assume this case would be handled the same way as if the float (or
any other box for that matter) is too wide, namely it will overflow.
This is always going to be an issue regardless of where floats are
positioned.  This issue is orthogonal to my question.

> Seems to cause more problems than solve others.

I have not made any proposal, so I don't understand what you mean by
"seems to cause more problems".  _What_ seems to cause more problems?

-- 
Joe

> Rainer Åhlfors
>
> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
> Of Joe Wells
> Sent: Tuesday, October 10, 2006 10:44 PM
> To: www-style@w3.org
> Subject: floats vs. page breaks
>
>
> Usually, one wants to position a float so that its top is as high as
> the top of the lowest-positioned box from earlier elements of the
> document.  When using paged media, doing so may cause the bottom of
> the float to extend below the bottom of the page.  It seems valid (and
> indeed proper) in this case for an implementation to decide to
> postpone a float to the next page.  For example, Konqueror does this.
> The relevant rule in CSS 2.1 (essentially the same rule is in CSS Box
> Model Level 3) is "A floating box must be placed as high as
> possible.".  It seems reasonable to decide that it is not "possible"
> to position a float in a place where it would be cut in half by a page
> break.
>
> When this happens, there seems to be no way (in CSS 2.1 or CSS Box
> Model Level 3) to ensure that any inline material from after the float
> in the document gets moved down with the float.  This has horrible
> implications for the way of implementing drop caps that is recommended
> in <URL:http://www.w3.org/TR/CSS21/selector.html#first-letter>,
> because it means that the drop cap can be moved after the paragraph it
> is supposed to begin!
>
> Comments?
>
> Is there a solution?
>
> Personally, I am not doing drop caps but rather something that should
> be typeset like drop caps.  I have some paragraphs that should begin
> with an image (several lines tall) which the paragraph text should be
> wrapped around.  Using left floats for this works fine for online web
> viewing, but gets messed up when printing due to the page breaks
> causing some of the floats to drop down to the next page.
>
> -- 
> Joe Wells

Received on Wednesday, 11 October 2006 17:44:58 UTC