Results 1 to 2 of 2

Thread: Word wrap

  1. #1
    Join Date
    Jun 2009
    Posts
    62
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default Word wrap

    I have a long URL.
    Code:
    <a href='reallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylonglink.html'>reallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylonglink.html</a>
    How do I word wrap it in a table cell? Thanks.

  2. #2
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    I found this style for you, either put it between <style> tags in the head of your HTML or even better put it in your CSS file, when tested it worked for me.

    HTML Code:
    td.wrap
    
    {
    width: 300px;
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
    
    }
    Then refer to it as a class in your <td> line, ie

    HTML Code:
    <td class="wrap">

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •