W3C home > Mailing lists > Public > www-style@w3.org > April 2003

Re: [css3-selectors] "recursive" selectors

From: Ben Godfrey <afternoon@uk2.net>
Date: Tue, 29 Apr 2003 15:57:06 +0100
To: www-style@w3.org
Message-Id: <D857A13E-7A52-11D7-BCD5-00039317C0C4@uk2.net>


On Tuesday, Apr 29, 2003, at 15:39 Europe/London, Ian Hickson wrote:

>> As far as I know there isn't any better way of achieving something 
>> like
>> this (centering all block-level elements), but should be in my 
>> opinion.
>
> Why would you want to center all block level elements?


Um, because you'd designed your page that way?

It would be a simple page, say three blocks, like this:

<div id="title">About me.</div>
<div>My name is Ben. This is my site.</div>
<div>Please visit <a href="http://mum.com/">my mum's site</a>.</div>

And you could present it really quite nicely with the following very 
simple stylesheet

body {
	margin:100px;
	background: url("incredibly_foxy_bg.jpg") no-repeat;
}
div {
	[some property that defines the centering, e.g. margin:auto;]
	border: 1px solid #39f;
	padding: 20px;
	margin: 2px;
}
#title { font-size:large; }

I think that would look quite lovely.

Ben


(q)	Ben Godfrey?
(a)	Web Developer and Designer
	See http://aftnn.org/ for details
Received on Tuesday, 29 April 2003 10:57:13 GMT

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