Break long text

Discussion in 'HTML' started by scripts.contact, Apr 23, 2007.

  1. 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>
     
    scripts.contact, Apr 23, 2007
    #1
    1. Advertising

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

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 23, 2007
    #2
    1. Advertising

  3. On Apr 23, 2:23 am, "Jukka K. Korpela" <> 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>
    > > longTextNoBreaksLogTextNlongTexTextNoBreaksLogTextNlongTextNoBreaksLogTextN­longTextNoBreaksLogTextNlongTextNoBreaksLogTextNlongTextNoBreaksLogTextNlon­gTextNoBreaksLogTextN
    > > </TD>

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


    It is. I just changed the text and removed some rows.
     
    scripts.contact, Apr 23, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    684
    Eric Sosman
    Jul 8, 2003
  2. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,197
    Peter Shaggy Haywood
    Sep 20, 2005
  3. Mathieu Dutour

    long long and long

    Mathieu Dutour, Jul 17, 2007, in forum: C Programming
    Replies:
    4
    Views:
    482
    santosh
    Jul 24, 2007
  4. Bart C

    Use of Long and Long Long

    Bart C, Jan 9, 2008, in forum: C Programming
    Replies:
    27
    Views:
    808
    Peter Nilsson
    Jan 15, 2008
  5. veryhotsausage
    Replies:
    1
    Views:
    1,811
    veryhotsausage
    Jul 4, 2008
Loading...

Share This Page