Re: May have to do with "column layout" WAS:RE: Proposal of alternative to CSS3 box-sizing property

Manos Batsis wrote:

> > -----Original Message-----
> > From: Rod Dav4is [mailto:dav4is@bigfoot.com]
>
> > Manos Batsis wrote in part:
> >
> > > But I don't want the default or "auto", that's why I'm
> > writing the style
> > > in the first place!
> >
> > Note that only so-called "legacy" UAs -- those which have not yet
> > implemented the new spec -- would behave in this way. In my
> > view it would be
> > better for them to ignore "width:50% outside" (and default to
> > "width:auto")
> > than to misapply "width:50%;box-sizing:border-box" by setting the
> > content-width to 50%.
>
> Damn, had not seen this one coming. How about using this:
>
> .myClass{
>  width:50%;
>  border:10px;
>  box-sizing:border-box; /* (or width-include:border;) */
>  max-width:50%;
> }
>
> With max-width being the safety belt against browsers that do not
> understand the new ways of calculating the width.

    No good. Max-width still applies (in legacy UAs) to the
content-width. The resulting box total width (again, in legacy UA) will
be 50% (of container) + margins + borders + paddings. In a CSS3
conforming UA the width will be (with box-sizing:border-box) 50% +
margins. Still too wide to fit two of them side-by-side in a container
if any margin at all is present.
    My proposal would allow such side-by-side placement very easily:

     .myClass{
      width:50% outside;
      border:10px;
     }

    Furthermore, under my proposal, you can change/add/delete margins,
borders, padding at will without worry that the fit will be compromised
-- unless, of course, the dimensions of these cause the content to no
longer fit in what's left over for content-width.

-R.

Received on Tuesday, 19 June 2001 07:18:03 UTC