Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
uninterruptible line of text (non-breaking)
Old 05-05-2009, 10:05 AM uninterruptible line of text (non-breaking)
MattCoops's Avatar
Ultra Talker

Posts: 423
Name: Matt Cupan
Location: Charlotte, NC
Trades: 0
I think there is a way to do this, but...

I have a line of text (about 4 words) positioned on a page after a div which is 200-something pixels wide and in between another div floated right.
When the user resizes the page at a certain point, the last word is broken and moved to the next line.

Is there a way to keep these four words together at all times?
So if there is a resize in browser window the whole line of text sticks together and moves to the next line if necessary.

Last resort is making a typographic image.
__________________
Matt - Tweeting
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

read my
Please login or register to view this content. Registration is FREE
MattCoops is offline
Reply With Quote
View Public Profile Visit MattCoops's homepage!
 
 
Register now for full access!
Old 05-05-2009, 11:15 AM Re: uninterruptible line of text (non-breaking)
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
You could use   instead of spaces as an easy solution.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 05-05-2009, 02:01 PM Re: uninterruptible line of text (non-breaking)
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
Is there a way to keep these four words together at all times?
Yes, and it's NOT using tons of   either!

You can use the <pre> tags around those words, or you can use the no-wrap option:
http://www.w3schools.com/CSS/pr_text_white-space.asp
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-05-2009, 02:29 PM Re: uninterruptible line of text (non-breaking)
MattCoops's Avatar
Ultra Talker

Posts: 423
Name: Matt Cupan
Location: Charlotte, NC
Trades: 0
thanks Lady,

added { white-space: nowrap; } and worked like a charm!

I knew there was some kind of good use to the white-space property.


I would get carpal syndrome if having to use &nbsp; in between each word.
__________________
Matt - Tweeting
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

read my
Please login or register to view this content. Registration is FREE

Last edited by MattCoops; 05-05-2009 at 02:34 PM..
MattCoops is offline
Reply With Quote
View Public Profile Visit MattCoops's homepage!
 
Old 05-05-2009, 08:48 PM Re: uninterruptible line of text (non-breaking)
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Well, I touched off something. See, and I was innocuously thinking, "it's 4 words, 3 spaces, and the text wasn't described as in it's own div, so what's a nice little solution." But, caught by "the evangelist". lol.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 05-06-2009, 07:14 AM Re: uninterruptible line of text (non-breaking)
Novice Talker

Posts: 5
Trades: 0
just add the <wrap> attribute and set it to no-wrap
__________________
Underlink
Please login or register to view this content. Registration is FREE

Freelance Website developer based in the UK
!!underlink!! is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to uninterruptible line of text (non-breaking)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.40041 seconds with 12 queries