Re: Horizontal rules

On 17-Feb-00, Matthew Brealey wrote:

>> No, it was the image that I wanted to float (to the left), the 'div' was
>> just a dummy container. Normally the above would be rendered as: [...]
> No.
> This is the correct rendering, assuming the HR's margin-top is equal to

Well, I moved the ruler one line down so that I could better show the clash in
ASCII.

> [...]
> The HR is not affected by the image.

And this is exactly my point, cause it would have been affected by the image in
normal (non CSS) HTML.

> Floats are one of the two exceptions to the 'later elements in the
> document tree stack on top' rule (the other being z-index).

I know this, and I think my drawing shows it as well -- but my point has
nothing to do with margin-top nor z-index but with the fact that an author
using HR together with floats (Img with Align set to Left or Right) will get a
counterintuitive result, because the float and the horizontal ruler collide,
assuming the browser is using CSS to render the page.

In my implementation of the CSS rendering model I've introduced a private
keyword for the margin-left/right property which instructs it to set the
margin to that of the combined width of floating elements, i.e. the horizontal
offset an inline element would normally experience -- but seeing your
'definition' of how to map a HR tag to CSS then such a thing lack, thus the
rendering of horizontal rulers won't conform to how they used to be rendered
(before CSS), that is: respecting floats.

Regards Allan
-- 
     URL: http://www.DIKU.dk/students/duff/
<sb>
Buy Pentium Pro 400MHz! You reboot faster...

Received on Thursday, 17 February 2000 13:54:52 UTC