Wrap Table Headers

How to wrap table headers

If you want to wrap table headers, you can set the white-space property for <th> HTML styling without impacting the header inner HTML. Since Knack exports the raw HTML, you can use CSS without needing to use <br> or <p> in the table headers.

You can read about whitespace in the MDN web document.

The JS

None needed 😎

The CSS

#view_XXX th { 
    white-space:normal;
}

How to Implement

Adjust the View ID and you are set!

Last updated

Was this helpful?