Results 1 to 4 of 4

Thread: Fixed width cells in tables with ASP???

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Question Fixed width cells in tables with ASP???

    I am displaying a line of text for each column in a table and the columns keeps changing sizes even when I specify the width of each. They keep expanding with the text. Is there any way to set the width of cells to a fixed width and force the text to either wrap or be cut off? I have tried everything and search for answers too!

  2. #2
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    What I do (And alot of other people do) is place a transparent gif in a header row with a specific width;

    Code:
    <table width="200">
    <tr>
    <td><img src="./shim.gif" width="100" height="1"></td>
    <td><img src="./shim.gif" width="100" height="1"></td>
    </tr>
    <tr>
    <td>Test one</td>
    <td>Test two</td>
    </tr>
    </table>
    That way the header sizes will always be the same and force a wrap

    HTH
    MarkusJ

  3. #3
    Lively Member
    Join Date
    Jun 2002
    Location
    Kuwait
    Posts
    85
    If your text contains spaces in between it will follow the next line. But if your text is a continous without spaces it will be displayed in a single line only. If you still want it to be done, you write code deciding ceratin number of characters per line and make the reamining characters to the displayed in the next line. just insert <br> tag after certain number of characters.
    Your attitude determines your altitude!!!

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Also, there's a <nobr> tag to wrap text in, along with &nbsp; (non-breaking space).
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

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



Click Here to Expand Forum to Full Width