Ok, anyone know what CSS I need to fix a column to 400px, containing a line of text with no white space. I can't use PHP or Javascript to modify the text. The following does not work:

<div style="width:400px;">
<table cellpadding=0 cellspacing=0 border=1 style="width:400px"><tr width=400><td width=400><div style="width:400px;">
This line of text wraps as expected because it contains many spaces. But the following seems to break it. I want it to wrap at 400 px.
<p>
555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
</div>
</td></tr></table>
</div>

Regards,
Ian Tresman

    You might want to try nowrap, but in any case, as evidenced by your quote "I can't use PHP or Javascript to modify the text.", this is a PHP forum, and we generally don't have a lot of time to solve non-PHP questions. An HTML forum might be more appropriate for this.

      Nothing you can do will force any browser to wrap the text if there are no whitespaces to break on. The best you can do is to use CSS to scroll the text 'overflow: scroll' or hide it 'overflow: hide'. Either will preserve your layout.

        Further discussion may be directed to an HTML/CSS forum.

          Write a Reply...