By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

making one table appear like another, with only css

P: n/a
I have two tables on the following page:

I'm trying to make the top one look like the bottom in using only
CSS. In FireFox, what I have, so far, works just fine. In IE7,
however, what I have doesn't seem to do anything. Any ideas as to
what CSS I might need to use to make the top look like the bottom in

Apr 7 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
On 7 Apr, 15:31, "yawnmoth" <terra1...@yahoo.comwrote:
I have two tables on the following page:

I'm trying to make the top one look like the bottom in using only
You're trying to do a "pivot" operation (in SQL terms) and swap rows
for columns. This requires a change to the internal structure of the
document and either a re-ordering of the elements within the table, or
else (as you're trying to do) changing the rendering behaviour of <tr>
and <tdto work as columns with cells stacked vertically within them.
For some quite fundamental reasons to do with keeping the rendering
process simple, CSS just doesn't have a flow model that models that
"newspaper column" behaviour (XSL:FO does, if you wanted to make

You might do better, in the direction you're already trying, by
looking into the other values for display that are deliberately
related to <tablerendering, such as table-column and table-cell,
rather than simply floating blocks. I don't know - I haven't tried it,
but it's worth a look.

Bear in mind though that the display: table-* property values were
originally intended for XML use, not HTML, and so they're not widely
supported. In particular IE doesn't, and I think this is the cause of
what you've seen here.

Of course it would be possible to do whatevver you want with CSS by
using position: absolute; However that's a fragile solution and
doesn't support automatic re-sizing well. Best avoid it.

On the whole. I think you're using the wrong tools here to address the
wrong problem. Rather than trying to present one logical structure as
looking like another, you might be better to transform it _into_ that
other logical structure first, using XSLT. This is a pretty easy piece
of XSLT. I assume you have server-side automatic generation of the
document (and so could do this), otherwise you'd just have pivoted the
table manually already.

Apr 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.