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
you dont
style the <td> instead
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
you also have divs inside a table
that's just dirty