PDA

View Full Version : Getting two words to stick on the same line



Keysle
May 27th, 2012, 03:26 AM
How can I get 11 & battles to be on the same line without using a BR? I need a dynamic/flexible way of handling words like this.
http://i.imgur.com/YhzUw.png

I was thinking of using invisible characters but I can't thin of any.
ALT+255 just returns a space.

Excavator
May 27th, 2012, 03:55 AM
Hello Keysle,
Use a non-breaking space (http://www.w3schools.com/html/html_entities.asp), like this 11 battles

felgall
May 27th, 2012, 05:45 AM
Or wrap it in a span like this:

<span style="white-space:nowrap">11 battles</span>

The non-breaking space is probably the better choice in this instance but it doesn't hurt to know the alternative.

Keysle
May 27th, 2012, 07:25 PM
Hello Keysle,
Use a non-breaking space (http://www.w3schools.com/html/html_entities.asp), like this 11&nbsp;battles

Odd. I tried one of those and it failed.
The no-wrap is good though. Thanks.


I always wondered what that stood for.

Excavator
May 27th, 2012, 09:17 PM
Odd. I tried one of those and it failed.

This makes me think something else is wrong. If you post your entire code, maybe we'd find what it is.

calsta
May 27th, 2012, 09:52 PM
this would of been a stupid suggestion but if anything else didn't work eventhough i have seen it is working you could just make the text size 1 or 2 smaller :)