[Note: Follow up set to n.p.m.layout, but change it if more appropriate.]

Reading through <http://www.w3.org/TR/CSS21/visuren.html#floats> and <http://www.w3.org/TR/CSS21/visuren.html#float-rules> I still can't explain why Mozilla (NS4 and IE, too) renders the following simple example like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html lang="en">
<head>
  <meta http-equiv="Content-Type"
      content="text/html; charset=US-ASCII">
  <title>Test Floats</title>
  <style type="text/css">
    .left { float: left; text-align: left; width: 5em;
      background: HighlightText; color: Highlight }
    .right { float: right; text-align: right; width: 5em;
      background: HighlightText; color: Highlight }
    .center { text-align: center }
    .hilite { background: Highlight; color: HighlightText }
  </style>
</head>
<body>

<p class="center hilite">
  <span class="left">left</span>
  <span>center</span>
  <span class="right">right</span>
</p>

<p class="hilite">
  <span>normal</span>
  <span class="left">left</span>
</p>

</body>
</html>

So in the first paragraph: Why the "right" element is shifted down? Why the "left" element is shifted down in the second paragraph?

BTW, Opera 7.11 (may be and prior versions, too) renders this example just fine. Here are two screen shots - from Mozilla and from Opera:

http://www.geocities.com/stanio/temp/moz-float.png
http://www.geocities.com/stanio/temp/opera-float.png

--
Replace "domain.invalid" with "gbg.bg" to reply.        _==_ _
                                                      _,(",)|_|
"Someone who thinks logically provides a nice          \/. \-|
contrast to the real world."                         __( :  )|_  hjw

_______________________________________________
Mozilla-layout mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-layout

Reply via email to