W3C home > Mailing lists > Public > www-html@w3.org > April 2001

RE: CSS vs. Tables

From: Baker, Thomas <Thomas.Baker@plc.cwplc.com>
Date: Thu, 12 Apr 2001 19:14:02 +0100
Message-Id: <DD149019965DD41186BB00508B647E7DBC3C6F@PLCEX6>
To: www-html@w3.org
Yes, the second set of divs works on IE5 SP2

Quite where that gets you, I don't know.

-----Original Message-----
From: Einar Westermann [mailto:einar.westermann@online.no]
Sent: 12 April 2001 19:01
To: Timothy Luoma; www-html@w3.org
Subject: Re: CSS vs. Tables


Maybe this will work:

<!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 />
<div style="text-align: left; width: 100%">left</div>
<div style="text-align: center; width: 100%">center</div>
<div style="text-align: right; width: 100%">right</div>
<br /><hr /><p>This is a test</p>
</body></html>

Timothy Luoma wrote:

> 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)
Received on Thursday, 12 April 2001 14:14:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:48 GMT