0

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%">
   <tr>
    <td>Jill</td>
     <td>Smith</td> 
    <td>50</td>
   </tr>
  <tr>
    <td>Eve</td>
     <td>Jackson</td> 
    <td>94</td>
   </tr>
</table>

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

Jill

Smith

50

instead of

Jill Smith 50

I tried :

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

but it doesn't work

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Stéphane GROSSMANN
  • 369
  • 2
  • 5
  • 14

1 Answers1

0

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';
.style.top = '50px'; //next one 100px and so on
.style.left = '0px';
Stéphane GROSSMANN
  • 369
  • 2
  • 5
  • 14