Stéphane GROSSMANN Stéphane GROSSMANN - 10 months ago 80
HTML Question

Change display of a table

With Javascript or java (in a webview), I wonder if it is possible to change the orientation of a table?

I need to display the columns in rows:

<table style="width:100%">

Is there a Javascript function who could display one column under the other?




instead of

Jill Smith 50

I tried :

window.document.getElementsByTagName('theTable')[0].style.display = "table-column";

but it doesn't work

Answer Source

I finally get it with a simple way. I set the following on each of the columns, and now they are displayed like rows.

.style.position = 'fixed'; = '50px'; //next one 100px and so on
.style.left = '0px';