Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Sep 2011
    Posts
    184
    Thanks
    140
    Thanked 0 Times in 0 Posts

    Prevent Text Wrapping and the Cell from being resized

    Hi There,

    I need your help.

    I would like to use a table with both fixed cell widths and heights

    Cell height: 14px
    Cell width: 25px

    How would I go about preventing a cell from wrapping really long text and from resizing:

    Ex.
    ______________________
    |THIS IS AN EXAMPLE OF
    |SOME REALLY LONG TYPED
    |TEXT THAT DOESN'T SEEM
    |TO FIT IN A CELL BOX.

    to:
    ________________________
    |THIS IS AN EXAMPLE OF SO|

    I am lost for answers and am seeking the help of the html gurus and genious

    Note, that I would like to use the standard style="" format and not a <style></style> method as the report would be automated.

    Thanks for everyones help in advance.

    Cheers,

    Jay

  • #2
    evo
    evo is offline
    waka Ionsurge
    Join Date
    Feb 2005
    Location
    United Kingdom
    Posts
    895
    Thanks
    5
    Thanked 12 Times in 12 Posts
    Just add:

    Code:
    style="white-space:nowrap;"

  • #3
    Regular Coder
    Join Date
    Sep 2011
    Posts
    184
    Thanks
    140
    Thanked 0 Times in 0 Posts
    Thanks Evo,

    Still no go though with your suggestion.

    Using your method in the code below, I still am unable to acheive the desired result.

    Any ideas as to what I am doing wrong?

    Code:
    <html>
    
    <head>
    
    </head>
    
    <body>
    
    <table style="white-space:nowrap;" border="0" width="72%" cellspacing="0" cellpadding="0" id="table1">
    	<tr>
    		<td width="361" height="14">THIS IS AN EXAMPLE OF SOME REALLY LONG TYPED TEXT THAT DOESN'T SEEM TO FIT IN A CELL BOX</td>
    		<td width="135" height="14"></td>
    		<td width="95" height="14"></td>
    		<td width="124" height="14"></td>
    	</tr>
    </table>
    
    </body>
    
    </html>

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,633
    Thanks
    0
    Thanked 649 Times in 639 Posts
    You added the style to the table - you should have added it to the td.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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