RE: Center DIV

Can't they just give us float:center? Please?

-----Original Message-----
From: Afternoon [mailto:afternoon@uk2.net]
Sent: 03 July 2003 15:16
To: www-style@w3.org
Subject: Re: Center DIV




No, there really isn't one.

I recommend writing non-standard HTML such as that required to create a 
100% table. Just leave out the DOCTYPE. Who cares if it validates. The 
view of people who wish to center block level objects and the view of 
the W3C CSS working group will not be harmonised for some time yet.

Ben


On Thursday, Jul 3, 2003, at 15:18 Europe/London, Jonas Galvez wrote:

>
> Hi, this is my first post on this list. Does anybody know
> an efficient way to place a <div> on the center of the
> page? I've tried everything. I read an article over @
> mrclay.org (url below) and the technique he teaches seems
> to be the perfect approach (in terms of CSS), but
> unfortunately, it doesn't work in IE.
>
> http://mrclay.org/web_design/centered_image/
>
> The *solution* I found was to position the image at 50% of
> the page and then compensate with a negative margin (with
> half of the size of the image). For example:
>
> <head>
>     <style type="text/css">
>     <!--
>     div.icon {
>         position: absolute;
>         margin-top: -20px;
>         margin-left: -20px;
>         top: 50%; left: 50%;
>     }
>     -->
>     </sytle.
> </head>
> <body>
>     <div class="icon">
>         <img src="image.gif" alt="Image" />
>     </div>
> </body>
>
> Any advice would be highly appreciated... :)
>
>
>
> --
> Jonas Galvez
> www.jonasgalvez.com
> www.macromedia.com/go/team
>
>

(q)	Ben Godfrey?
(a)	Web Developer and Designer
	See http://aftnn.org/ for details

Received on Thursday, 3 July 2003 10:24:58 UTC