I am working on an angular 8 project at work. I have a page that displays a table. As per the current code the width of each column was set like below. Widths are only set for th
and not for td
.data-table tr th:nth-child(1) {
width: 20%;
}
.data-table tr th:nth-child(2) {
width: 10%;
}
.data-table tr th:nth-child(3) {
width: 16%;
}
.data-table tr th:nth-child(4) {
width: 18%;
}
.data-table tr th:nth-child(5) {
width: 18%;
}
.data-table tr th:nth-child(6) {
width: 15%;
}
.data-table tr th:nth-child(7) {
width: 5%;
}
First column in table is Title
. I want width of title
to be set such that it fits the longest Title
in every row. Is there a way to do this without Javascript??