Re: CSS vs. Tables

> The w3c is moving toward using tables just for tabular data, and 
> using CSS for layout, but they have a way to go yet to make it work 
> properly.

Hasn't the w3c always wanted to avoid using tables for layout?

> Though I did an experiment with doing a layout that imitated 
> frames but using only divs. It only works in NS6 though, as IE only
> supports top and left for defining div position, not bottom 
> and right. that is, IE can only do fixed width div layouts. 
> (as far as I have been able to test)

Thanks for the page.

It gave me an idea.... "Could <div>s give me one line that has left-, 
center-, and right- aligned text?"

Something like this:

left                        center                   right


(Which is something that I can only do using Tables, as far as I know)

So I tried this (in Opera)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html><head><title>absolute divs</title>
<style><!-- div	{ position:absolute } --></style></head>
<body>
<div align="left">left</div>
<div align="center">center</div>
<div align="right">right</div>
<br /><hr /><p>This is a test</p>
</body></html>


It fails totally in IE (I don't have Netscape installed, so I can't say 
how it works there)

http://www.peak.org/~luomat/misc/divtest.htm

It'll be nice when we get to the point where we don't have to use 
tables for layout, but it's a long way away, unfortunately.

TjL

Received on Thursday, 12 April 2001 13:26:11 UTC