Milos Cuculovic
Milos Cuculovic

Reputation: 20223

HTML Table row (tr): How to set the height fixed, equals to the biggest height element

I have a table in my html page. Inside, I have trs and tds.

My goal is to set somehow the height of each tr to be the same size as the height of the biggest tr.

For example:

I have 3 trs: In each tr i can have an image. In the first one, there is no image, in the second one, the image is 20px height and in the third one is 30px height. My goal is to heve the 3 trs to be 30px height = aligned to the height of the biggest image.

Thank you.

Upvotes: 0

Views: 3255

Answers (1)

Madara's Ghost
Madara's Ghost

Reputation: 174977

If you know the largest <tr> height in advance, set the height for all trs to it in your CSS file:

tr {
   height: <INSERT-HEIGHT-HERE>px;
}

Upvotes: 2

Related Questions