Limit height of table row??

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a table with a Rich Text field. I have a dream where I can limit the height of the rows of the table and have a scroll bar on the rich text field that will allow me to view the entire contents of the rich text field. Is such wizardry possible?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Hi Raymond, for this you can target a specific table column with inline CSS like this:
td:nth-child(6) > .nx-field > .nx-fieldtext {    
    height: 100px;
    overflow-y: scroll;    
}
where the number "6" is the column to apply the rule to. You can change that as well as the height of the cell. You might also want to set separate max-height: and min-height: values instead of just one universal value. This way of targeting the column by nth-child appears to work well with the new user-end ability to hide and organize columns. 

If you need to apply this behavior specifically to one table and column, you would want to add the table's unique ID# and the css selector would look something like this:

#sk-2zm-Ss-216 table.nx-skootable-data tbody td:nth-child(6) > .nx-field > .nx-fieldtext { 
    height: 100px;   
overflow-y: scroll;
}
where sk-2zm-Ss-216 would be replaced with your table's unique ID. 
(Edited)
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Fantastic! Thanks Mark!