- From: David Wagner <dwagner@kevric.com>
- Date: Fri, 11 Feb 2000 17:18:54 -0600
- To: <www-html@w3.org>
Not only is this possible, it's easy using CSS. It is not so easy, however, to find a browser to render it properly (IE5 works). I pasted HTML below to show how I have found it much better to use sized inline elements for most of what used to go into tables. The spec for tables has become so complicated it is usually quicker, simpler, and more elegant to just use lists or other appropriate elements, and reformat them with CSS for consistantly sized horizontal layout. If you would like to have fun, set the height small then add overflow:auto. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>Two Column List Demo</title> <style type="text/css"> /*Note the use of em, since there is no character-width unit;*/ /*% works, but keep in mind the width of the container. (IE5 likes them to total less than 100%)*/ .cola {width:8em;} .colb {width:8em;padding-left:1em;} .cola, .colb {vertical-align:top;} </style> <meta http-equiv="Content-Type" content="text/html"> </head> <body> <p>This demo works in IE5.</p> <ol><li> <span class="cola">Left Column</span> <span class="colb">Right Column</span></li><li> <span class="cola">Left column with far too many words to fit.</span> <span class="colb">Right Column</span></li><li> <span class="cola">Left Column</span> <span class="colb">Right Column</span></li><li> <span class="cola">Left Column</span> <span class="colb">Right Column</span></li> </ol> </body> </html> > -----Original Message----- > From: www-html-request@w3.org > I'm trying to create a page that has a two column table, > where the items in the > left column are numbered (as in an ordered list). I can't > seem to find a way to > arrange the table and list tags in a way that works. This is > what the output > should resemble: > > 1. Left Column Right Column > 2. Left Column Right Column > 3. Left Column that is Right Column > so long it wraps > 4. Left Column Right Column > > > Any suggestions? Is this even possible? > Thanks, > Peter Foti > > >
Received on Friday, 11 February 2000 18:23:46 UTC