W3C home > Mailing lists > Public > www-style@w3.org > June 2001

Re: border size and combining units

From: Rod Dav4is <dav4is@bigfoot.com>
Date: Sat, 30 Jun 2001 09:08:46 -0400
Message-ID: <3B3DCF5E.B1B943FA@bigfoot.com>
To: www-style@w3.org
Once again the default "reply to" has caught me out. The reply copied below was
intended for the public list. I'll get the hang of it yet ;o) -R.

Rod Dav4is wrote:

> see below...
>
> Mjumbe Ukweli wrote:
>
> > is there a reason that borders-widths cannot be percentage values?  it would
> > make it that much easier to create fluid GUIs if they could.
> >
> > also (and i believe that this was suggested a while ago, though i can't
> > remember when or by whom) there should be some way to add two different
> > units together to size an element:
> >
> > elm1 {
> >     position: absolute;
> >     left: 0%;
> >     width: 50%;
> >
> >     margin: 10px;
> > }
> > elm2 {
> >     position: absolute;
> >     left: 50% + 20px;   /* to accomodate elm1 */
> >     width: 50% - 20px;
> > }
> >
>
> Would this proposal do it?
>
>     A new optional modifier to Width (and Height) properties, "Outside". When
> used, it causes the UA to make the specified length or percentage apply to the
> *outside* of the box rather than to the content. It would do this by adjusting
> the content width to make the outside box dimension be as specified, taking into
> account whatever margins, borders and paddings are in effect.
>     In your example, I would make a container DIV that could be positioned
> however you want, and place two "elm's" inside it. Assuming that you just want
> the two them to just fit snugly inside the container, the same properties for
> both would do it:
>
>      elm {float:left;margin:10px;width:50% outside}
>
>     Note that you could fiddle with the margin, border, and padding and the
> conforming UAs would adjust the content width to accommodate them -- as long as
> the content object actually fits in the space left over. If not, this would be
> treated as any other problem of fit.
>     Also, consider the legacy UA that doesn't implement (yet) the new "outside"
> modifier. The presence of the modifier would "poison" the width property,
> causing it to be ignored, reverting to "auto". Depending on the type of object
> and its size, the rendering may still approximate what is intended.
>
> -R.
Received on Saturday, 30 June 2001 09:09:10 GMT

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