Tech Sharing Blog

Web, Tech, Tips, Download Blog…

Advertisement

HTML table word wrap

By David on September 21, 2009

I created a table to display a link which consist of a long verification code plus some variable to pass to the web site. There is no any space within the long url and query string. This is not the problem, the problem is on my table, because of the link is in one long string without any space, so when it display on the screen, the table is expanded.


I come across few solution, some people suggest that using the javascript to split the string in to 2 or more row when it excess the string lenght limit. I don’t think this is the best solution, and finally get the solution of control the table using the CSS.


WORD-BREAK:BREAK-ALL;

Syntax:

<table style=”word-wrap: break-word;” width=100>
     <tr>
          <td>long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_string</td>
    </tr>
</table>

Popularity: 1% [?]



Related posts:

  1. SQL Server Do’s And Dont’s So, you are now the leader of a SQL Server...

  2. Uploading photo to Picasa via Email Picasa now allow you to upload the photo in the...


Comments

One Response to “HTML table word wrap”

  1. I just found out from some of the forum regarding this topic, it only work on IE, but not firefox.

    For firefox, if there is the way, then you have to write the code to count the string lenght and split it into multiple line.
    David´s last blog ..10% off for all Pofoko Laptop sleeve discount code My ComLuv Profile

Write a Comment

CommentLuv Enabled
SEO Powered by Platinum SEO from Techblissonline