Allow line breaks in table headers

  • 5
  • Idea
  • Updated 4 years ago
  • Under Consideration
If I put a return/line break in a field custom label, and show that field in a field editor, it seems to work as desired - the field label is rendered with a line break in it. However, when I do this with a table, the line break is not rendered at all; The two lines just get smushed together on the same line. Since some of my table's field names are long, and I can't set the width of the column myself, I'd like to get the the field titles in the header to stack vertically to make appropriate room on the page.
Photo of Peter Bender

Peter Bender, Champion

  • 6,246 Points 5k badge 2x thumb

Posted 6 years ago

  • 5
Photo of JD Bell

JD Bell, Senior Product Engineer

  • 2,996 Points 2k badge 2x thumb
Official Response
Until we provide a declarative solution, please use the following CSS to achieve this effect. (Some of the suggestions below are now out of date and may not work as expected.)
th
{
    vertical-align: top;
}

th > span
{
    display: inline-block;
    white-space: normal;
}
(Edited)