W3C home > Mailing lists > Public > www-style@w3.org > September 2000

RE: POSITION: relative-to?

From: Stephanos Piperoglou <stephanos@webreference.com>
Date: Thu, 7 Sep 2000 19:55:10 +0100 (BST)
To: Kevin LaVergne <Kevin.LaVergne@Parago.Com>
cc: Maury Markowitz <maury@sympatico.ca>, www-style@w3.org, Bert Bos <Bert.Bos@sophia.inria.fr>
Message-ID: <Pine.LNX.4.21.0009071938440.972-100000@highnoon.spn>
On Mon, 28 Aug 2000, Kevin LaVergne wrote:

> Just an idea. Check out http://webreference.com/html. The main page
> is something that you may want to look at, plus they have a tutorial
> there (Tutorial 19: CSS Positioning, Part II) that explains how they
> did it.

*clears throat* Before you jump on that, however, note that Tutorial
19 still has problems. I recently updated the technique for IE5.5/Win
(which broke it, even though it worked fine in IE4 and IE5) but it
seems the fix broke it for IE4, slightly. It appears IE4 will
sometimes inherit horizontal margins (shock! horror!) *if* they are
specified in ems (sweet, no?).

The technique is essentially the same as columns with floats: You
position a block on the side and make room for it using a margin
(originally) or a padding (after the fix; IE5.5 calculates containing
blocks in a wierd way, so setting a margin on the other column changes
the containing block - even though the margin belongs to a box that is
a child of the box that sets the containing block!). I suspect this
has a lot to do with IE5.5/Win's newly misimplemented inline box
model. Mr. Wilson, any comments? :-)

Also note that I don't have access to a Mac so I haven't really tried
*any* of these techniques on IE/Mac. This will change soon, I hope.

Trying to come up with style sheets that produce legible results in
IE3, IE4, IE5/Win, IE5.5/Win, IE5/Mac, Nav4 *AND* comply to the spec
is hard enough, but it's mostly a process of trial and error, where
you tweak values and try different approaches until it works. The one
thing I've learned from writing HTML with Style is that coming up with
formulas that work reliably is even harder. IE4's annoying habit of
treating margins and padding differently depending on which units you
use is probably the one thing for which I haven't come up with a
reliable workaround other than "play with it until it works". IE4's
margins will sometimes collapse, sometimes not, sometimes padding
will collapse with margins, sometimes margins and paddings will
actually be *inherited*, and worse.

Stephanos Piperoglou                              <stephanos@webreference.com>
Maintainer, HTML with Style                    <http://webreference.com/html/>
  Visit HTML with Style for online HTML and CSS tutorials with step-by-step
   procedures and practical examples to help you author Web pages that are
 full-featured, standards-compliant and backwards-compatible, tools to make a
 Web author's life easier, software reviews, opinions, industry news and more
Received on Thursday, 7 September 2000 12:56:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:55 UTC