function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

how to wrap text in a column of page block table??



i have a pageblock table  which has columns


one of the column has data coming from field whose data type is text(256)


i have fixed the width of the column as

<apex:column width="30%" >


but when i write a long text value in the field.........the column width goes beyond 30%


so i want to wrap the text to second line when the width is 30% so that it cannot go beyond 30%


please provide me way of doing it !!!!!!

To Wrap TD text

First set table style

table-layout: fixed;

then set TD Style


here TD is column

Using white-space attribute worked for me easily.  The whole table must be fixed width also to be able to wrap the text.