开发者

JSP/JSTL word wrap in a table

开发者 https://www.devze.com 2023-01-10 09:00 出处:网络
I have a table of width 800 and one inner table within that of width 100%. The tr td looks like this <tr><td align=\"right\" valign= \"top\"><c:out value=\"HOUSE:\" /></td><

I have a table of width 800 and one inner table within that of width 100%. The tr td looks like this

<tr><td align="right" valign= "top"><c:out value="HOUSE:  " /></td><td nowrap  align="left" valign= "top"> <c:out value='${houseBean.houseLabel}'/></td></tr>

Now when houseLabel goes beyond 5 values, the table grows beyond its width of 800. I tried using word-wrap to wrap around the values, but not working. Can anyone suggest a way of using wrap in JSTL/JSP. One more thing is the houseLabel values are in an开发者_如何学运维 arraylist.


Remove the nowrap attribute. It would force the table cell not to wrap its contents.

This problem is not specifically related to JSP/JSTL. The generated HTML is what counts here.

0

精彩评论

暂无评论...
验证码 换一张
取 消