Forum Moderators: not2easy

Message Too Old, No Replies

changing the way tables are displayed

         

phpologist

11:15 am on Feb 29, 2004 (gmt 0)

10+ Year Member



I want to use table markup for my guestbook. Each entry has a poster's name, date, time and message. Structured data hence the use of tables.

however, I don't want the data displayed in tabular form. I want each entry displayed in it's own 'block'. A google search for 'css reformat table' leads to a site with a clever technique for acheiving this, but it doesn't work in IE6 :(

before I start tearing my hair out over it, I wanted to ask if it was possible? Has anyone managed it? Can tables be re-formatted in IE using hacks/workarounds or would I just be wasting my time?

ram_mac

12:50 pm on Feb 29, 2004 (gmt 0)

10+ Year Member



how about just displaying the <td>'s as block?

haven't tested yet but should work.

<html>
<head>
<style type="text/css">
table, tr, td {
border: 1px solid #000;
padding: 10px;
margin: 5px;
}
td {
display: block;
}
</style>
</head>
<body>
<table>
<tr>
<td>
<p>Stuff<p>
</td>
<td>
<p>Stuff<p>
</td>
<td>
<p>Stuff<p>
</td>
</tr>
<tr>
<td>
<p>Things<p>
</td>
<td>
<p>Things<p>
</td>
<td>
<p>Things<p>
</td>
</tr>
</table>
</body>
</html>

SuzyUK

1:27 pm on Feb 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wanted to ask if it was possible?

is this the site [moronicbajebus.com] - it will be wonderful but unfortunately table property support is not implemented by IE yet :(

table{ display: table;} thead{ display: table-header-group;} tbody{ display: table-row-group;} tr{ display: table-row;} td{ display: table-cell;}

It's tantalisingly close though ;).. even full implementation of display: inline-block; (IE6 supports this) would help...

You could do it with floated/positioned divs though..

Disclaimer:
I know that people say that this is regarded as tabular data but the lack of CSS Table Properties implementation is case in point for not using a Table if you want it to look different just now... (Catch22 almost)

Suzy

phpologist

3:09 pm on Feb 29, 2004 (gmt 0)

10+ Year Member



ram: I'll give you suggestion a try, thx.

suzy: yes that is the site, but I didnt think url's were allowed! I'll probably end up using div's as you suggest. You're right about it being catch 22, I'd love to use tables for my guestbook and for the forums, but they look wrong in tabular form so div's it is for now.

ram_mac

7:32 pm on Feb 29, 2004 (gmt 0)

10+ Year Member



URL's are allowed - but I think the problem is the "can you look at my site" posts as it is open to spam.