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 } 

here's fiddle


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -