Results 1 to 4 of 4

Thread: How to use white space property for CSS to No Wrap

  1. #1
    Join Date
    Feb 2009
    Posts
    81

    How to use white space property for CSS to No Wrap

    How to Use the white-space property to change the way text is wrapped or not wrapped. I have a doubt whether is it possible to set everything to nowrap through css? How can I set nowrap=true in firefox, because i have tried out but IE doesn't seem to want to listen. Anyone have a fix for this? Please let me know.

  2. #2
    Join Date
    Dec 2008
    Posts
    183

    Re: How to use white space property for CSS to No Wrap

    To apply this style to all td's in a table you need to use inheritance. You may define a table id and set its td's to this style. To explicitly set how new lines in text are displayed and to set whether the formatting of text in the html document should remain when displayed in the browser This way you don't need to set the class of each td cell in a table:

    <table id="mytable">
    <tr><td></td><td></td></tr>
    </table>
    table#mytable tr td{white-space:nowrap}

  3. #3
    Join Date
    Dec 2008
    Posts
    120

    Re: How to use white space property for CSS to No Wrap

    This example shows the use of the value pre. Using this value you can make an html element behave like the html <pre> tag. To be more exact, the example anchor tags are appearing as actual links (oh! and one of them even works LOL!) Fortunatelly, the <td> and <li> items are there.

    Code:
    <html>
            <head>
               <title>No Wrap</title>
            </head>
    
    <body>
        <div>
        <div style="background-color:#36f; color:#000; width:100px; white-space:nowrap;">25 68 49 13 49 76 83 96 17 18 19 20</div>
       </div>
    </body>
    </html>

  4. #4
    Join Date
    Jan 2009
    Posts
    96

    Re: How to use white space property for CSS to No Wrap

    I've used this rule for every TD that I needed and it worked fine on FireFox, but in IE the text is wrapped. Use the white-space property to change the way text is wrapped or not wrapped, to explicitly set how new lines in text are displayed and to set whether the formatting of text in the html document, hose values with a corresponding asteryx in front of them are the ones that don't work.

Similar Threads

  1. Replies: 2
    Last Post: 21-02-2012, 05:13 PM
  2. Replies: 7
    Last Post: 18-09-2011, 08:00 AM
  3. Strange white space services menu windows
    By Fabiulin91 in forum Operating Systems
    Replies: 1
    Last Post: 16-04-2011, 12:55 AM
  4. White space in vi editor
    By NetworkeR in forum Windows Software
    Replies: 5
    Last Post: 12-12-2009, 08:30 AM
  5. Required white space is missing
    By Basaam in forum Technology & Internet
    Replies: 3
    Last Post: 09-06-2009, 10:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,913,647.52234 seconds with 17 queries