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

Nolan Clark <nolanc@ischool.washington.edu> wrote on 10/24/01 7:19:08 PM:
>
>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).

I'm loathe to say the horizontal formatting works very well.  I need to use it 
more before I'll make a decision about it's effectiveness.  Nonetheless, the 
situation I am talking about is centering, horizontally and vertically, a block-
level non-replaced element without explicit width or height defined, in which 
case margin will not help. 

Received on Wednesday, 24 October 2001 19:37:35 UTC