W3C home > Mailing lists > Public > www-style@w3.org > October 1996

margins on floated elements

From: David Perrell <davidp@earthlink.net>
Date: Wed, 23 Oct 1996 11:11:11 -0700
Message-Id: <199610231817.LAA28628@andorra.it.earthlink.net>
To: "Hakon Lie" <howcome@w3.org>, "Bert Bos" <bert@w3.org>
Cc: "Chris Wilson" <cwilso@microsoft.com>, "Style" <www-style@w3.org>
I tried to illustrate how margins on floated elements can give much
control over the formatting of such elements at
<http://www.socnet.com/users/hpaa/margins.html>. Unfortunately, section
4.2 of the CSS1 spec of 11-Sept-96 implies my examples are incorrect.

Elsewhere in the spec, margins determine the spacing between elements.
For example, section 5.1.1 states that "the margins express the minimal
distance between the borders of two adjacent elements" and "when margin
properties are applied to replaced elements (e.g. IMG), they express
the minimal distance from the replaced element to any of the content of
the parent element." This is logical. But section 4.2 states that the
seven properties that influence the horizontal dimension of an element
must add up to the width of the parent element. If the effective width
of a _floated_ element must equal the entire width of the parent, it
should then not be possible to wrap text around the element at all!

To subject floated elements to the constraints on block element margins
described in 4.2 is illogical and contradictory, and unnecessarily
limits the usefulness of float. Would it not make more sense to assume
margins of 0 for the floated element unless otherwise specified, and
specify that the parent's content wrap around the element in accordance
with the definition of margins in section 5.1.1?

Respectfully,

David Perrell
Received on Wednesday, 23 October 1996 14:17:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:45 GMT