Re: floating images flush bottom
David Perrell wrote:
> In HTML, an align right or left image will be rendered on the line
> following the <IMG ...> tag if the tag is not at the beginning of the
> line. So if a horizontally-aligned image is the last element in a
> paragraph it will be rendered below all text in the paragraph.
> This may make sense in HTML, but floating elements in CSS1 should not
> be treated the same way. Since floated elements are outside the normal
> flow yet constrained as far as possible within the parent, floated
> elements that would otherwise extend below the final text of a parent
> element should be drawn up into the parent element and bottom-aligned
> with the parent's content so far as is possible without causing the
> floated element to extend above the parent's content.
As a browser developer I'd like to give you some feedback on this.
Right now it is fairly simple to handle out of flow objects as they only
affect subsequent lines. Your proposal creates a situation where I'd
have to lay out the paragraph in an iterative manner. Why? Well
consider that once the decision is made (because the image would extend
beyond the paragraph) I'll need to back up some number of lines and
relayout. How many? Ah, that's the trick, it isn't a deterministic
number of lines, it needs to be a best guess, and depending on where
the paragraph now ends, I might need to revise the guess.
If HTML layout was a static process done once for output, and
performance didn't matter, this would probably be an uninteresting
argument. But they aren't. I can tell you that my users are very
sensitive to layout performance. Is this proposal worth the complexity?
How many word-processors can handle this kind of constraint?
Doug Rand <email@example.com> (508) 567 - 2217
Silicon Graphics/Silicon Desktop http://reality.sgi.com/drand
Disclaimer: These are my views, SGI's views are in 3D