471,618 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

Word Wrapping in CSS/HTML

2
I'm searching for a way to force 2 words to always appear together on the same line in IE, FireFox and NN 8.x. The 2 words are my company's name. Let's use Deloitte Touche as an example. Each Web browser decides when to wrap text and could place Deloitte on one line and run out of room, and put Touche on the next line. I'd like for the browser to realize it's running out of room and to put Deloitte Touche together on the next line. Essentially, Deloitte Touche should always appear together because it's the name of a company. I'm willing to use HTML or CSS to accomplish this. I have tried the pre tag and have also searched for a CSS style, but haven't had any success.
Sep 4 '07 #1
2 1313
drhowarddrfine
7,435 Expert 4TB
p{
width:12em;
outline:1px solid blue
}

span{
white-space:nowrap
}

<p>This is <span>Deloitte Touche</span></p>
Sep 4 '07 #2
js19
2
Thanks, that solved my problem.
Sep 5 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Adam Knight | last post: by
11 posts views Thread by yawnmoth | last post: by
10 posts views Thread by Douglas G | last post: by
10 posts views Thread by Jeff B. | last post: by
reply views Thread by Brian Conway | last post: by
2 posts views Thread by Mr TVTL | last post: by
10 posts views Thread by Lorenzo Thurman | last post: by
6 posts views Thread by Eric Layman | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.