2

I have little problem positioning text in the middle of table row.

enter image description here

Each table row contains three <td> elements. I want to position text in the middle of the cell. Now 'Name' text where 'Description' is longer is in top. I tired

td {
  vertical-align: middle;
}

but that doesn't work. How to correctly position text?

UPDATE
This worked fine:

.table tbody>tr>td.vert-align{
    vertical-align: middle;
}
m4n0
  • 29,823
  • 27
  • 76
  • 89
Karolis
  • 137
  • 4
  • 12

1 Answers1

2

Another great option that I find the most compliant is using the line-height property to vertically align/center single line text

td {
  line-height: 100px; /*play around with this value*/
}
m4n0
  • 29,823
  • 27
  • 76
  • 89
Chris
  • 113
  • 4