Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Wrap ????

Status
Not open for further replies.

rizza

Programmer
Jul 16, 2002
66
US
I received a request from one of my clients to have their company name not break across lines...ie

This is a paragraph of text....this is there Company Name, since it is two words sometimes it looks like Company Name.
This is not acceptable...is there some sort of no break or no wrap...i can use.

Thanks to all in advance...

Rizza
 
<span style=&quot;whitespace:nowrap;&quot;>Company Name With Spaces That Won't Break</span>
 
Try putting <div nowrap></div> around your text.
This works in IE and Opera, not Mozilla though.

-----------------------------------
&quot;Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.&quot; - Rich Cook
 
If you want compatibilty with old browsers the best way to go is <nobr>Company Name with Spaces</nobr> .
 
Maim,

Why use IE only extensions? Why can't we use standard compliant ways of doing things so that everyone with any browser can see things?

All,

I prefer Mr3Putt's standard compliant way of dealing with the problem. Future browsers will work great with it and older ones will have display quirks that will encourage them to upgrade (browsers are free for atheism's sake!).

If older browsers need to be supported (which I understand but frown upon) then <NOBR> is great as wiser3 pointed out.

Gary Haran
********************************
 
rizza (Programmer): I received a request from one of my clients to have their company name not break across lines...

Um, forgive me if I'm being dum-dum, but why won't this work:

Code:
<!DOCTYPE html 
     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
     &quot;[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>[/URL]

<html xmlns=&quot;[URL unfurl="true"]http://www.w3.org/1999/xhtml&quot;[/URL] xml:lang=&quot;en&quot; lang=&quot;en&quot;>
  <head>
    <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;></meta>
    <title>Text Sample</title>
  </head>
  <body>
    <p>I have a company and the name of this company is Wahaguantaneesopafillasloopynoopynoi, which is an ancient Swiss word meaning The&nbsp;Company&nbsp;That&nbsp;Makes&nbsp;Computer&nbsp;Parts&nbsp;Out&nbsp;of&nbsp;Cheese&nbsp;and&nbsp;Goatskins and I'm very proud of this company.</p>
  </body>
</html>

Cheers,




[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Ah crap, forgot to escape my ampersand characters...

Here's the listing:

Code:
<!DOCTYPE html 
     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
     &quot;[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>[/URL]

<html xmlns=&quot;[URL unfurl="true"]http://www.w3.org/1999/xhtml&quot;[/URL] xml:lang=&quot;en&quot; lang=&quot;en&quot;>
  <head>
    <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;></meta>
    <title>Text Sample</title>
  </head>
  <body>
    <p>I have a company and the name of this company is Wahaguantaneesopafillasloopynoopynoi, which is an ancient Swiss word meaning The&amp;nbsp;Company&amp;nbsp;That&amp;nbsp;Makes&amp;nbsp;Computer&amp;nbsp;Parts&amp;nbsp;Out&amp;nbsp;of&amp;nbsp;Cheese&amp;nbsp;and&amp;nbsp;Goatskins and I'm very proud of this company.</p>
  </body>
</html>

It's the blonde streak, I swear.

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top