Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Weblogs table as an ordered list

Dave Winer:

A question for CSS design gurus. What’s the best you can do with a table that has three columns like the one on Weblogs.Com. Let’s see an example. I’d like the page to look good and load fast. Postscript: No one seems to understand -- I want to do weblogs.com without a table. Column 1 is the number, column 2 is the name of the weblog. Column 3 is the time it last updated. Look at the page.

At first glance this seems an odd request—from a semantic point of view, the data on Weblogs.com is tabular in nature and would seem like a fine place for a table. I imagine Dave’s request relates to performance—I don’t know if modern browsers still refuse to render tables until they have loaded all of the content but if that is the case then the Weblogs page could be pretty slow on a narrow-band connection. In any case, the data on the page could also be interpreted as an ordered list. I can never resist a challenge so I had a go.

I’ve tested it on Phoenix 0.5 and IE 6 on the PC and it worked fine. However, I would be surprised if it worked flawlessly on all modern browsers as it makes heavy use of an absolutely positioned element inside a relatively positioned element. As a result, the data is probably best left as a (perfectly semantically valid) table.

This is Weblogs table as an ordered list by Simon Willison, posted on 28th January 2003.

Tagged ,

View blog reactions

Next: Weblogs markover

Previous: Dynamic Python class methods

3 comments

  1. Doesn't work in Opera 6.x on Windows. Try this instead: ol { /* the default display for an OL-tag is 'block' */ padding-left : 0; /* the default stylesheet in some browsers uses padding to indent lists and we don't want those browsers to display double intenting */ margin-left : 2em; } li { clear : both; } li a { float: left; /* (floating implicitly sets the A-tag to display as 'block'.) */ width : 30em; /* set this width to your liking. Use px, %, or whichever units you like. */ } li .date { /* insert date styling here */ }

    Már Örlygsson - 28th January 2003 11:56 - #

  2. ...hmmm. another approach with it's own set of benefits/drawbacks: ol { padding-left : 0; margin-left : 2em; } li { clear : both; text-align : right; } li a { float: left; text-align : left; } li .date { /* insert date styling here */ }

    Már Örlygsson - 28th January 2003 12:19 - #

  3. There's a way, in IE at least, to make tables render incrementally. Here's the article I just wrote: http://michaelw.net/Articles/TablesvsLists.html

    Michael Winser - 28th January 2003 18:15 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/01/28/weblogsTableAsAnOrderedList

A django site