views:

124

answers:

1

Hi,

I want to switch between vertical and horizontal table layout for same data.

Although it is possible to do it by making applying the same CSS for the first column for the vertical layout as the css applied for the header row for the Horizontal layout.

Is there is any way where we can make the webpage render the way we like it (Horizontal/Vertical) .

Thanks.

P.S. I could not add any Images. Apologies for that.

+1  A: 

Are you saying you want to switch rows and columns effectively?

You can't do that with tables because A). rows and columns have specific semantics and B). the way this is structured in HTML markup groups cells in row sets, not in table sets with indices you could apply a matrix to. Obviously JS can do it if you really must.

If you have single row of cells you could arrange a similar effect with floating <div> tags with a container <div> which changes width (amongst other methods)

annakata