html - How to take nth-child in css? -
how select :nth-child() elements in html except last element.
is valid=
td:nth-child:not(last-child){ //some css// } i using text-overflow:ellipsis property hide overflow table in <td> elements.
it got successful using even,odd children of <td>. want ellipsis effects in td blocks except last child of table.
i've given try-
.table-condensed tbody tr td:nth-child:not(last-child) { white-space: nowrap; text-overflow: ellipsis; width: 150px; display: block; overflow: hidden; } but that's not trick obviously. suggestions?
little bit long-winded, should trick:
tr:not(:last-child) > td, tr:last-child > td:not(:last-child) { // styles }
Comments
Post a Comment