Forum Discussion
Caroline_Webb
May 29, 2024Copper Contributor
Text wrapping in a table
The text has stopped wrapping at the end of the line. It was okay but I must have done something to mess it up. It’s as if it’s hidden under the next column. Help!
Holaway
Jun 03, 2024Iron Contributor
You will need to set a max width for each column.
Best practice is to do this in the first line:
{| class="wikitable" style="width:80%" ! style="width:15%" | title 1 ! style="width:45%" | title 2 ! style="width:40%" | title 3 |- ! Item 1 ! Description 1 ! Extra info 1 |}
We are saying that the table will take up 80% of the width space available and of that space each column will take up their respective percentage of that width. Text will wrap once it hits the end of the given width for the cell it is in.