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

Re: Unlogical width with percentages

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Sun, 10 Oct 1999 18:28:19 +0100 (BST)
To: Erik Arvidsson <d96erik@dtek.chalmers.se>
cc: mozilla-layout@mozilla.org, www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9910101810230.6224-100000@ss1.bath.ac.uk>
On Sun, 10 Oct 1999, Erik Arvidsson wrote (on mozilla-layout):

> Thanks... I read the proposal a few days ago but it does not solve
> issues in browser without CSS3 (that means all of them). I'm still
> stuck where I started. The only solution I can think of is using
> scripting but I think that the average developer will get realy
> frustrated that he/she cannot acheive the correct look using CSS2
> only.
> So this leaves me no solution to this VERY simple problem.

Ok, so let's have another go...

>>> My goal is to have a container that fills the entire parent width
>>> and it should also have a border on each side. How can this be
>>> achieved in CSS?

Assuming you have this markup:

   <div> <!-- This is the parent. -->

      <div> This is the container. </div> 


...then to do what you want to do, you use:

   div div { width: auto; border: solid; }

Hmm. I assume I misunderstood your original request, surely it can't
be this simple???

(BTW, my proposal about extending 'boz-sizing' still stands, as if you
are trying to make a (e.g. floated) box with a total margin-edge to
margin-edge width of 50% the parent's content width, but with fixed
size border, padding and margin (given e.g. in "em" units) then there
is indeed no way of doing it at the moment. The 'box-sizing' idea
works quite well IMHO.)

> p.s. I think the W3C needs to wake up to real life applications
> instead of working with an imaginary test platforms.

The W3C members are the same people who write the web browsers and the
web sites. For example, the HTML Writer's Guide is (IIRC) a W3C
member, as are Netscape, Microsoft, and so on. So I believe `they'
probably _are_ awake to real life applications.

And if there is something that you need which is missing from a
specification, then say so on one of the W3C lists -- that is what
they are for, after all.

Ian Hickson
"I take a Professor Bullett approach to my answers. There's a high
probability that they may be right."
  -- Dr Snow; Mechanics Lecturer at Bath University; 1999-03-04
Received on Sunday, 10 October 1999 13:28:24 UTC

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