Re: Inconsistent position:relative behaviour

-------- Original-Nachricht --------
> Datum: Sun, 13 Feb 2011 06:27:00 +1100
> Von: Alan Gresley <alan@css-class.com>

> On 13/02/2011 5:05 AM, Markus Ernst wrote:
> 
> > It is this sentence then:
> >
> > "The top margin of an in-flow block box is adjoining to its first
> > in-flow block-level child's top margin if the element has no top
> > border, no top padding, and the child has no clearance."
> >
> > I must admit I was not aware of what this means before. Is there any
> > use case that makes margin collapsing between parent and child
> > elements desirable?
> 
> 
> Yes. When an element is not in normal flow and many more other cases 
> that I could take weeks to articulate.

Well I'd expect "normal" behaviour for an element in normal flow; and as "normal" I'd consider if the vertical and horizontal behaviours are the same. Generally, I'd expect simple solutions for the simple cases, and more complicated solutions for the more sophisticated cases.

Anyway, I am aware of the fact that matching authors' expectations is not the only goal of CSS development. Look at my comment as a piece of general author feedback.

> <http://css-class.com/test/bugs/ie/floatsandblockelements.htm>
> 
> <http://css-class.com/test/css/visformatting/ap-collapsing-margins.htm>

These are interesting cases, but more kind of abstract test cases than illustrative use cases.

> > I'd actually suggest to drop this. Making a margin of a child element
> > affect the behaviour of the parent looks highly counterintuitive to
> > me.
> 
> If this behavior was dropped, the web would be broken.

Of course I see this point. My input comes quite some years too late for further consideration.

> > My use case is a very common task: A footer that sticks at the
> > viewport bottom if there's enough space, but always remains below the
> > content area if there is more content. I set up a test page that
> > illustrates how I'd expect to code this:
> > http://www.markusernst.ch/stuff_for_the_world/css-position-test2.html
> 
> 
> Add this.
> 
> #main { overflow: auto; padding-bottom: 1em; }

-------- Original-Nachricht --------
> Datum: Sun, 13 Feb 2011 06:50:24 +1100
> Von: Alan Gresley <alan@css-class.com>
> 
> Incorrect. This is better.
> 
> #main { overflow: auto; padding-bottom: 1px 0 1em; }
> 
> 
> Markus, there is a list for CSS help.
> 
> <http://www.css-discuss.org/mailman/listinfo/css-d>

I was not meaning to ask for assistance. From my everyday practice I learnt that vertical stuff is generally more difficult in CSS than horizontal stuff, which I don't think is desirable. So I was just meaning to point to an aspect that makes using CSS more difficult than it could be.

Thanks for the link anyway, I subscribed to that list, and may ask questions there next time before posting here.

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

Received on Saturday, 12 February 2011 22:06:43 UTC