Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Break long text

Reply
Thread Tools

Break long text

 
 
scripts.contact
Guest
Posts: n/a
 
      04-23-2007
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>
longTextNoBreaksLogTextNlongTexTextNoBreaksLogText NlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNl ongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlon gTextNoBreaksLogTextN
</TD>
</TR>

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

<url:data:text/
html;charset=utf-8;base64,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL 0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmc vVFIvaHRtbDQvc3RyaWN0LmR0ZCI
%2BDQo8aHRtbD4NCiAgPGhlYWQ
%2BDQogIDx0aXRsZT5EQVRBPC90aXRsZT4NCiAgPC9oZWFkPg0 KICA8Ym9keT4NCiAgIDxUQUJMRSB3aWR0aD0iMTAwJSIgYm9yZ GVyPTE
%2BDQogICA8VEJPRFk%2BDQogICAgPFRSPg0KICAgICA8VEQ
%2BQUJDPC9URD4NCiAgICAgPFREPlhZWjwvVEQ%2BDQogICAgP C9UUj4NCiAgICA8VFI
%2BDQogICAgIDxURD5ERUY8L1REPg0KICAgICA8VEQ
%2BIGxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXhUZXh 0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZ Xh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9 CcmVha3NMb2dUZXh0TmxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0T mxvbmdUZXh0Tm9CcmVha3NMb2dUZXh0Tg0KICAgIDwvVEQ
%2BDQogICAgPC9UUj4NCiAgIDwvVEJPRFk%2BDQogICA8L1RBQ kxFPg0KICA8L2JvZHk
%2BDQo8L2h0bWw%2BDQo%3D>

 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      04-23-2007
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>
> longTextNoBreaksLogTextNlongTexTextNoBreaksLogText NlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNl ongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlon gTextNoBreaksLogTextN
> </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,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL 0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmc vVFIvaHRtbDQvc3RyaWN0LmR0ZCI
> %2BDQo8aHRtbD4NCiAgPGhlYWQ


Someone puked at the end of your message.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
 
scripts.contact
Guest
Posts: n/a
 
      04-23-2007
On Apr 23, 2:23 am, "Jukka K. Korpela" <(E-Mail Removed)> wrote:
> > 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; }


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).

> > <TD>
> > longTextNoBreaksLogTextNlongTexTextNoBreaksLogText NlongTextNoBreaksLogTextN*longTextNoBreaksLogTextN longTextNoBreaksLogTextNlongTextNoBreaksLogTextNlo n*gTextNoBreaksLogTextN
> > </TD>

>
> This isn't your real example, is it?


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having compilation error: no match for call to (const __gnu_cxx::hash<long long int>) (const long long int&) veryhotsausage C++ 1 07-04-2008 05:41 PM
`if (!p ? i++ : 0) break;' == `if (!p){ i++; break;}' ? lovecreatesbea...@gmail.com C Programming 12 04-14-2008 07:59 AM
long long and long Mathieu Dutour C Programming 4 07-24-2007 11:15 AM
unsigned long long int to long double Daniel Rudy C Programming 5 09-20-2005 02:37 AM
Assigning unsigned long to unsigned long long George Marsaglia C Programming 1 07-08-2003 05:16 PM



Advertisments