Having trouble with div inside td to get 100% of td height.

How can I ensure consistent heights for cards within table cells (<td>) in my HTML table, maintaining their heights proportional to the content rather than filling up remaining space? I've encountered an issue where applying height: 100% to the table results in unwanted behavior when there are few data entries. CodePen example for reference: https://codepen.io/umanga/pen/WNWawWj
3 Replies
ἔρως
ἔρως9mo ago
you dont style the <td> instead
MarkBoots
MarkBoots9mo ago
other option is to fake the box with a pseudo element on the <td> that has the bg and border-radius https://codepen.io/MarkBoots/pen/bGJmeyj
ἔρως
ἔρως9mo ago
you also have divs inside a table that's just dirty
Want results from more Discord servers?
Add your server