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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spaces in anchor text, no break 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
0
0
GB
Hi,

I have a bunch of links, the anchor text contains multiple words, when the space for the text runs out it splits the anchor across the next line.

How do I stop this and force the whole anchor to the next line if it doesn't fit.

I've tried
Code:
a {text-wrap:none}
but it doesn't work.

thanks,
1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hi

Yes, that is what I was about to suggest, but renounced because
[ul]
[li]Does not work in Explorer 6, or at least not for me.[/li]
[li]You will have to pay attention how you write the HTML source, because it simply preserves the original whitespace characters, so \r, \n and \t too, if happens so.[/li]
[/ul]

Feherke.
 
Yeah , you're right feherke, and it ignores all the fixed widths on my TD and DIV and stretches the cell to fit the darn content regardless!

hmmm anything else I can do?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
bingo, thanks Chris.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Or for the simplest of ideas, use   instead of the white space. 'Tis pretty much its intended use - a non-breaking space entity.

Regards, Andy.
**************************************
My pathetic attempts at learning HTML can be laughed at here:
My home page
 
hmmm, so simple, it's genius!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top