Ppm
Ppm

Reputation: 162

Wrap Text not working properly

I have a table structure like below:

<table>
<tr>
    <td>
        <div id="FirstDiv">
            <table>
                    <tr>
                            <td>
                            </td>
                    </tr>
            </table>
        </div>            
    </td>
    <td>
        <div id="SecondDiv">
        </div>
    </td>
</tr>
</table>

The structure of FirstDiv and SecondDiv are same. The td tag inside FirstDiv contains some text and I am showing the text (Text is dynamic one,it is coming from back end.) using anchor tag but if the text is more wider than 150px, it is pushing the border to right. According to requirement, there should not be any horizontal scroll bar so, I tried to wrap the text inside the anchor tag, giving styles like word-wrap:normal, but till now not able to fix it. Its either giving me a horizontal scroll bar or pushing the border to right.

Thanks in advance.

Upvotes: 0

Views: 173

Answers (1)

zenkaty
zenkaty

Reputation: 1548

Try this:

table {table-layout:fixed}
td {width:50%}

Upvotes: 1

Related Questions