designer wrote:
OK, I don't use tables, except for tabular data. I've been doing this standards stuff for for just one year and there is only one place where I use a table for layout, and that is to put something (div, or whatever) slap bang in the middle of the screen, both vertically and horizontally. There are many ways to do this, but none of them (that I know) are as simple or as reliable as this method using a single-cell table:

G'day Bob,

It is of somewhat limited use, due to width constraints, but this works beautifully in the right circumstances:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd";> <html lang="en-au"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Centre test</title>
        <style type="text/css">
                html, body   {height: 100%; margin: 0; padding: 0;}
div#content {background-color: #FFC; height: 50%; width: 50%; position: absolute; left: 25%; top: 25%; }
        </style>
</head>
<body>
        <div id="content">
                <h1>Oooh, a heading</h1>
                <h2>A sub-heading</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis nonummy posuere tortor. Ut sollicitudin imperdiet ante. Quisque facilisis porta turpis. Ut porttitor dictum tellus. Aliquam in risus. Duis magna est, lobortis nec, gravida vitae, tempor eget, magna. Phasellus luctus enim in tortor.</p>
        </div>
</body></html>

Save all that as an HTML file and see what you think

Cheers
Lachlan
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to