Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to display two lines inside one row in html

I am working with a project in ASP MVC and Bootstrap where I have the need to show the regulation of a transformer, this is represented in the following way:

enter image description here

I was trying to do it in the following way but I did not achieve the result that I intend:

<table>
  <tr>
    <td rowspan="2">132 &#177;</td>
    <td>12x1,5 %</td>
  </tr>
  <tr style="margin-top: 0px;">
    <td>8x1.5%</td>
  </tr>
</table>
like image 845
Juan Salvador Portugal Avatar asked Dec 31 '25 13:12

Juan Salvador Portugal


1 Answers

You're on the right track of using rowspan with table. I completed it with the example below, and it's better to use monospace fonts.

table {
  font-family: monospace;
}

td[rowspan] {
  font-size: 1.5em;
}
<table>
  <tr>
    <td rowspan="2">(132</td>
    <td>+ 12x1,5 %</td>
    <td rowspan="2">)/13,86kV</td>
  </tr>
  <tr>
    <td>- 8x1.5 %</td>
  </tr>
</table>
like image 134
Stickers Avatar answered Jan 03 '26 03:01

Stickers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!