I have seen table tr coming in horizontal fashion. Like following:
<table style="width:50%;">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr style="height:100px">
<td valign="bottom">January</td>
<td valign="bottom">$100</td>
</tr>
</table>
My requirement is:
Month January
Savings $100
But, not with following code & with CSS - Vertical alignment. Bcz, I am using angular ngFor which I need to display 1/2/3 columns dynamically.
<table style="width:50%;">
<tr>
<th>Month</th>
<td valign="bottom">January</td>
</tr>
<tr style="height:100px">
<th>Savings</th>
<td valign="bottom">$100</td>
</tr>
</table>
Current solution I know is:
<table style="width:50%;">
<tr>
<th>Month</th>
<td *ngFor="let i of is">{{i.a}}</td>
</tr>
<tr style="height:100px">
<th>Savings</th>
<td *ngFor="let i of is">{{i.b}}</td>
</tr>
</table>
Here I need to write ngFor multiple times. I did this with div and css, but I need all row cells in same height dynamically - which I am not seeing with that. How can I display table tr vertical in direction with CSS?