Forum Moderators: not2easy

Message Too Old, No Replies

Representing Data: Tables, Key-Value pairs, Trees etc. Properly

Tables have bad css layout control in IE, what works for you?

         

theodore

12:58 pm on Oct 12, 2003 (gmt 0)

10+ Year Member



I want to represent some user data in a table but im having problems formatting it in CSS:

The main problems ive had with tables is that i cant make TR's float side by side and use all availiable space to make a mult-column table in IE, this is pretty important since some of the data is long but only a few columns and i want it to use space efficiently.

In Opera and Mozilla this works fine and you can take a table and represent it in alsorts of visual ways:


table,tbody,tr,td { display: block;}
thead { display: none;}

In IE this does nothing, i cant do anything with rows or cells unless they are position:absolute;

An example:

username..location..age 
bob.......london....35
jim.......paris.....26
tony......new york..32

Using the above code and some "content:" for the labels i could make that table look like this:

bob
location: london
age: 35

jim
location: paris
age: 26

tony
location: new york
age: 32

It works perfectly in almost every browser except IE x.x, what would you do to represent the same data in HTML that could be formatted both ways and not loose its "meaning"?

Has anyone else had problems representing any other types of data - key-value trees, nested lists etc and reformatting them into different layouts? what works best for you? im interested in any types, eg for representing forms and labels.

Nick_W

11:30 am on Oct 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld!

I don't use tables so often, anyone have a grip on this issue?

Nick