I have a table that has one column containing long code snippets without spaces. When I print the table, the first two columns are squished to only 2 or 3 characters, making an awful look, and lots of pages.
Is there a way to set a column or cell so that it will break a line after a certain number of characters, or a certain number of pixels/inches?
Even when I set the column widths, it gets overridden, and the first two rows still get squished.
Making a table cell break a long line of text
-
scooter262
- Propeller Head
- Posts: 37
- Joined: Wed Mar 11, 2009 11:14 am
-
BedfordWriter
- Sr. Propeller Head
- Posts: 231
- Joined: Wed Jun 23, 2010 10:13 am
- Location: Nova Scotia
Re: Making a table cell break a long line of text
You can force word breaks with in the style for an element. Note that there may be browser support issues with that. There's also
If I may, I also suggest looking into using div tags to display columns rather than using tables.
Code: Select all
word-break: break-all;Code: Select all
overflow-wrap: break-word;