table cell wrapping

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

table cell wrapping

#1

Postby Segi » Fri Dec 30, 2016 1:33 am

I have a table with 2 columns and both of these columns each have an individual cell that contains a long string of text. This occurs when the table columns are display only. I set the column width to a 5%.

Both columns have the display area set to Text area with a relatively small display length (30) and 3 rows but the row is still only displaying as a single row.

I do not have any other CSS style sheets applied to this table or page that would affect it.

Is there a way to force the table cell to wrap over to a new line after X number of characters ?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Jan 03, 2017 9:29 am

It's probably best to use an explicit width unit e.g. px specified at either table or column level, as opposed to a relative unit like %. It sounds like the browser thinks that the table can be expanded horizontally to accommodate the content. The default wrap CSS is white-space:normal; which means "wrap" so this is probably OK.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#3

Postby Segi » Tue Jan 03, 2017 4:34 pm

Jon

Thanks, I accomplished the same thing using this CSS in the data style property:

Code: Select all

max-width:250px;
word-wrap:break-word;
Segi
0 x


Who is online

Users browsing this forum: No registered users and 45 guests