how to fix width of input text in grid's column

Discussion in 'HTML & Website Design' started by shamal, Jun 9, 2008.

  1. #1
    can any one help to fix the width of inputext coming from a database in a grid column, text is larger than the width of column, n break the div of that grid.
    thx in advance
     
    shamal, Jun 9, 2008 IP
  2. dddougal

    dddougal Well-Known Member

    Messages:
    676
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Its difficult really, by far the easiest way is to make the column width slightly wider than your longest word.
    Failing that then you would need to try and split the long words up using php.

    wordwrap ( string $str [, int $width [, string $break [, bool $cut ]]] )

    eg:

    $text = "The quick brown fox jumped over the lazy dog.";
    $newtext = wordwrap($text, 20, "<br />\n");

    echo $newtext;

    will output:

    The quick brown fox<br />
    jumped over the lazy<br />
    dog.

    Straight off the php website

    http://uk.php.net/wordwrap

    If you need any help drop me a PM and il see what i can do.
     
    dddougal, Jun 9, 2008 IP
  3. shamal

    shamal Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    php isnt using, the files are o fjsp..
     
    shamal, Jun 9, 2008 IP