Forum Discussion

Former_Member's avatar
Former_Member
Accelerator III
8 years ago

Wrap text in Div table cell

I'm trying to put some "help text" into a DIV table on a form and want the text within the DIV table "cells" to wrap. According to all the CSS suggestions I can find I should be able to do it just by putting a "style=word-wrap: break-word;" or in fact it should be standard for normal sentences (ie not extremely long words) to just wrap within the cell anyway. I have not been able to get it to do this. The text overhangs the cell to the right when I constrain the DIV table and no placement of "style=word-wrap: break-word;" at any level stops it from doing this. Any assistance in remedying this appreciated. Cheers, Brian.

2 Replies

  • Hi Bryan, Glad to hear from you. I tried what you explained and it seems like the field CSS is overwritten by another css regarding the white-space criteria. What I have done to make it work (maybe there are multiple solutions) is to add a class (class="helptext") to my div and in the "FORM" css add the following : .helptext { white-space: normal; } Of course the div also has to have a width defined (I did it in the field css)