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

RE: How is it possible to devise such a feeble system?

From: Nolan Clark <nolanc@ischool.washington.edu>
Date: Wed, 24 Oct 2001 16:19:08 -0700
Message-ID: <AACA31416CB5764DA77546B31532C5A70975FA@fileserv.ischool.washington.edu>
To: "'www-style@w3.org'" <www-style@w3.org>
Granted, CSS2 lacks a simple method to vertically center content, but the
horizontal centering works very well. It does not make sense to add
centering support to CSS, because that functionality is already built into
the horizontal part of the box model. The most logical thing to do would be
to extend the box model so vertical formatting worked exactly like
horizontal formatting.

Then you could easily center content both horizontally and vertically like
this:

<div style="with:100px; height:100px">
	<div style="margin:auto"> content </div>
</div>

This would be a very minor extension to CSS2, but it could be very difficult
to actually implement in a browser (something I have no experience with).


-----Original Message-----
|   What I want to know is, why is there not a (extremely simple) way for me
| to horizontally and vertically center the text, contained within the inner
| DIV, 'whole2'?


--- Vadim Plessky <lucy-ples@mtu-net.ru> wrote:
1) Because people writing CSS specs forgot to include it :-)
2) because we (you and me) were not here when CSS2 specification was in 
developemnt ;-))

IMO, it needs a fix. Let's get CSS 2.1 with this thing fixed in hands! 
Received on Wednesday, 24 October 2001 19:19:20 GMT

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