7 Replies - 55867 Views - Last Post: 08 December 2010 - 04:19 AM

#1 angelo dundee  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 29-June 05

How can I force all my text to stay on one line

Posted 14 June 2006 - 01:29 AM

A simple thing !!!!! :blink:

I am just doing some very basic HTML.
I am trying to get a string of text with some spaces output onto a single
line.
However when I view the result, the text is broken, onto 2 lines.
If there were no spaces in the text, it will output onto 1 single line.

What can I do to ensure that the line of text with spaces is output onto 1 single
line ?

Thanks, Angelo Dundee ( from Dundee ) ;)

Is This A Good Question/Topic? 0
  • +

Replies To: How can I force all my text to stay on one line

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: How can I force all my text to stay on one line

Posted 14 June 2006 - 05:36 AM

One way (although not alwas reliable):
http://www.htmlcodet...epar/_NOBR.html

You can also take a look at the &nbsp usage.
Was This Post Helpful? 1
  • +
  • -

#3 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1877
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: How can I force all my text to stay on one line

Posted 14 June 2006 - 07:35 AM

I think the NOBR tag might be overkill, and as you said, unreliable.

There are 2 options available depending on how you are displaying the text.

If you are displaying text in a table cell you would do <td nowrap>Long Text Here</td>. If you are using a div or a span, you can use the style="white-space: nowrap;"

Good luck.
Was This Post Helpful? 4

#4 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: How can I force all my text to stay on one line

Posted 14 June 2006 - 08:10 AM

Good call!
Was This Post Helpful? 0
  • +
  • -

#5 angelo dundee  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 29-June 05

Re: How can I force all my text to stay on one line

Posted 14 June 2006 - 10:51 AM

Wolfgang, and Sky, thanks for your help.

Dundee.
Was This Post Helpful? 0
  • +
  • -

#6 Guest_kunal gupta*


Reputation:

Re: How can I force all my text to stay on one line

Posted 16 June 2010 - 02:19 AM

thanks man... nice help
Was This Post Helpful? 0

#7 sizons  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-December 10

Re: How can I force all my text to stay on one line

Posted 08 December 2010 - 02:34 AM

View Postskyhawk133, on 14 June 2006 - 06:35 AM, said:

I think the NOBR tag might be overkill, and as you said, unreliable.

There are 2 options available depending on how you are displaying the text.

If you are displaying text in a table cell you would do <td nowrap>Long Text Here</td>. If you are using a div or a span, you can use the style="white-space: nowrap;"

Good luck.


Whilst I realise this is a very old thread I need help in a similar mannar, I have used your advice above for a table, this works for me though my problem is that I then have all the input fields on the table shift to accomodate the text being to the right of the text, I don't know if I am clear hear, is there a way to make the text span the length of the table.
Was This Post Helpful? 0
  • +
  • -

#8 Shado3225  Icon User is offline

  • D.I.C Regular

Reputation: 17
  • View blog
  • Posts: 325
  • Joined: 23-February 10

Re: How can I force all my text to stay on one line

Posted 08 December 2010 - 04:19 AM

Dude, start a new thread, you more likely to be helped that way.
Was This Post Helpful? -1
  • +
  • -

Page 1 of 1