cannot break word in table td

35 views
Skip to first unread message

tong123123

unread,
Jan 21, 2013, 5:22:43 AM1/21/13
to google-we...@googlegroups.com
In normal HTML, I have try, in a table, set
table-layout:fixed
then in td, set
white-space:normal;
word-wrap:break-word;

the long word can be broken to two line in IE9.
BUT when I use GWT 2.4 FlexTable, I set similar property.
there is a <div> inside <td> as I use new HTML(".....");
I try to apply
white-space:normal;
word-wrap:break-word;
inside the <td> and <div> of the fixed-layout table,
but the long word cannot be broken in IE9. what is the cause?

breakword.png

tong123123

unread,
Jan 21, 2013, 9:36:39 PM1/21/13
to google-we...@googlegroups.com
I found the solution, before I set the FlexTable

table-layout:fixed
then in td, set
white-space:normal;
word-wrap:break-word;
in column, I set
flexTable.getColumnFormatter().setWidth(0, "150px");
flexTable.getcolumnFormatter().setWidth(1, "200px");

 the word in td cannot be broken, after I add
flexTable.setWidth("350px");
the word in td can be broken!!


Reply all
Reply to author
Forward
0 new messages