Sydney
Sydney

Reputation: 12212

text does not word wrap inside a table

I want the text inside my table to word-wrap. The constraint is that I can't change the HTML since it's generated by the server.

I created a JSFiddle

In case it's not working:

<div style="width: 25%">
    <table class="af_selectManyCheckbox" id="pt1:r1:1:smc1" cellpadding="0" cellspacing="0" border="0">
        <tbody>
            <tr>
                <td class="af_selectManyCheckbox_label" valign="top"/>
                <td valign="top" class="AFContentCell" nowrap="">
                    <div class="af_selectManyCheckbox_content">
                        <div>
                            <span class="af_selectManyCheckbox_content-input">
                                <input class="af_selectManyCheckbox_native-input" type="checkbox" value="0"/>
                            </span>
                            <label class="af_selectManyCheckbox_item-text">It allows a component to partially refresh another component whose partialSubmit property is set to true.</label>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>

Upvotes: 1

Views: 72

Answers (1)

Nitesh
Nitesh

Reputation: 15749

Here you go.

WORKING DEMO

The CSS Code:

.col-md-3 label {
    white-space: normal;
}

Hope this helps.

Upvotes: 5

Related Questions