
Hey,
I am trying to format a HTML table and this works well using the code below. One simple thing I cannot seem to work out is how I specify the max row height of the table?
At this stage I have a fixed column width, which makes the row height very big for fields with lots of text.. I want to cap it so it only displays a 'preview' of the text?
<style>
table{
background-color: #e3e5e8;
text-align:left;
font:arial;
border: 1px solid black;
border-collapse: collapse;
table-layout: fixed;
width: 1800px;
column-width: 300px
}
</style>
</div>
<div id = "table" >
@{outputs('Compose_table')}
</div>
Hi @DanielaHo ,
To change the height of a row in a table, you can use the height attribute for the <tr> tag.
Please check the following Example in the following link:
https://www.w3schools.com/tags/att_td_height.asp
Please try with the following code:
<style>
table{
background-color: #e3e5e8;
text-align:left;
font:arial;
border: 1px solid black;
border-collapse: collapse;
table-layout: fixed;
width: 1800px;
column-width: 300px
}
</style>
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td height="100">January</td>
<td height="100">$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
Best regards,
Mabel