Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-08-2009
Member
 
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.
Reply With Quote
  #2  
Old 07-08-2009
Member
 
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}
Reply With Quote
  #3  
Old 07-08-2009
Member
 
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>
Reply With Quote
  #4  
Old 07-08-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to use white space property for CSS to No Wrap"
Thread Thread Starter Forum Replies Last Post
Anyway to display the white space characters in Microsoft Excel !Jumala! MS Office Support 2 21-02-2012 05:13 PM
When I launch Rise of Immortals then it just opens a blank white space No-Mercy Video Games 7 18-09-2011 08:00 AM
Strange white space services menu windows Fabiulin91 Operating Systems 1 16-04-2011 12:55 AM
White space in vi editor NetworkeR Windows Software 5 12-12-2009 08:30 AM
Required white space is missing Basaam Technology & Internet 3 09-06-2009 10:08 PM


All times are GMT +5.5. The time now is 05:35 AM.