How to do word wrapping.

Posted by Talha Bin Shakir on Stack Overflow See other posts from Stack Overflow or by Talha Bin Shakir
Published on 2009-10-06T17:47:51Z Indexed on 2010/06/09 11:52 UTC
Read the original article Hit count: 237

Filed under:
|

Hi,

I have created a table in PHP but the cells size is not fixed it expends when the input is long. Here is the Code.

echo "<div style=\"overflow-y: scroll; white-space: nowrap; height: 190px;\">\n";
        echo "<table cellspacing=\"1\" cellpadding=\"1\" align=\"center\" width=\"100%\" id=\"clients\">\n";
        echo "<tr bgcolor=\"2b2d5d\">\n";
        echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">&nbsp;</th>\n";
        echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Name</th>\n";
        echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Address</th>\n";
        echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Phone</th>\n";
        echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Fax</th>\n";

I want to fixed the cells width please need help. Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about html