Break long text

S

scripts.contact

I want exactly 100% width but the 2nd cell in last row(see below)
breaks the layout.
I already tried:
-setting width on td
-css overflow:hidden , overflow:scroll
with no luck. Can anybody tell me how to solve this without changing
the text.
----------------
<TABLE width="100%" border=1>
<TBODY>
<TR>
<TD>ABC</TD>
<TD>XYZ</TD>
</TR>

<TR>
<TD>DEF</TD>
<TD>
longTextNoBreaksLogTextNlongTexTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextN
</TD>
</TR>

</TBODY>
</TABLE>
-----------------

<url:data:text/
html;charset=utf-8;base64,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI
%2BDQo8aHRtbD4NCiAgPGhlYWQ
%2BDQogIDx0aXRsZT5EQVRBPC90aXRsZT4NCiAgPC9oZWFkPg0KICA8Ym9keT4NCiAgIDxUQUJMRSB3aWR0aD0iMTAwJSIgYm9yZGVyPTE
%2BDQogICA8VEJPRFk%2BDQogICAgPFRSPg0KICAgICA8VEQ
%2BQUJDPC9URD4NCiAgICAgPFREPlhZWjwvVEQ%2BDQogICAgPC9UUj4NCiAgICA8VFI
%2BDQogICAgIDxURD5ERUY8L1REPg0KICAgICA8VEQ
%2BIGxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXhUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0Tg0KICAgIDwvVEQ
%2BDQogICAgPC9UUj4NCiAgIDwvVEJPRFk%2BDQogICA8L1RBQkxFPg0KICA8L2JvZHk
%2BDQo8L2h0bWw%2BDQo%3D>
 
J

Jukka K. Korpela

Scripsit scripts.contact:
I want exactly 100% width but the 2nd cell in last row(see below)
breaks the layout.

Then break the long text, as your Subject line says. :)
I already tried:
-setting width on td
-css overflow:hidden , overflow:scroll
with no luck.

If you really want to hide the rest of the text, add
table { table-layout: fixed; }

If you want it scrollable, you also need to use <td><div
class="longtext">...</div></td> with
..longtext { overflow: scroll; }
(Due to IE bug, it does not help to set overflow on td directly.)

But why don't you break the text?
<TD>
longTextNoBreaksLogTextNlongTexTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextN
</TD>

This isn't your real example, is it? If you posted the URL of a real
example, I'm pretty sure we could find a solution rather than a way to
create a new problem.
<url:data:text/
html;charset=utf-8;base64,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI
%2BDQo8aHRtbD4NCiAgPGhlYWQ

Someone puked at the end of your message.
 
S

scripts.contact

If you really want to hide the rest of the text, add
table { table-layout: fixed; }

Yes. That worked. Thanks !
If you want it scrollable, you also need to use
<td><div class="longtext">...</div></td> with
.longtext { overflow: scroll; }
(Due to IE bug, it does not help to set overflow on td directly.)

The Div method didn't work in my IE (but it worked in opera).
This isn't your real example, is it?

It is. I just changed the text and removed some rows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top