CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    22

    [resolved]Preventing multiline table entries HTML

    I am developing a report generator for my boss. I've gotten it to pull all of the information necessary and read it into a table, however, the table can be extremely large both in number of entries and width. Is there any way that I can make it so that a cell will not allow multiline text? For example...

    I want "Client Contact Information" to always read

    Client Contact Information

    instead of

    Client
    Contact
    Information

    I don't mind my table extending well beyond the width of the screen. If anybody can help me out with this it would be greatly appreciated. Thank you for your time.

    for all interested this problem was solved by using some css.

    white-space: nowrap
    Last edited by Rabidmuskrat; July 25th, 2005 at 03:19 PM.

  2. #2
    Join Date
    Jun 2005
    Posts
    1,255

    Re: Preventing multiline table entries HTML

    There is a style for your needs. Assign it to the "td" (table data) tag like that:
    Code:
    <html>
    <style type="text/css">
      td {
         white-space: nowrap;
      }
    </style>
    <table border=1>
    <tr>
    <td>
    Two men are figthing each other. A judge come and listens to the first man. He concludes he is right. He listens to the second man. He concludes he is right too. Another persom comes and remarks that it is impossible everybody is right. The judge says that this third person is right.
    </td>
    <tr>
    <table>
    </html>

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

Featured