Manual break
am 19.08.2007 20:09:01 von no
Hello,
is there a html entity or something that tells browser where it can brake
text when lacking white spaces?
In example I have text:
aaaaaaaaaaaaammmmmmmmmmmmmmmmmmmmmmmmmmmzzzzz
and its displayed in container that (with this font etc) will hold up to 10
characters (or will overflow etc which is bad).
I can insert spaces manually like
aaaaaaaaaa aaammmmmmm mmmmmmmmmm mmmmmmmmmz zzzzzzz
and so on.
But can I insert not a space but some character that will be only used if no
other is suitable to brake the stirng with?
Re: Manual break
am 19.08.2007 20:38:52 von jkorpela
Scripsit Rafal Maj:
> Hello,
> is there a html entity or something that tells browser where it can
> brake text when lacking white spaces?
There's something, namely the tag, which is widely supported by
browsers though not contained in any specification.
> In example I have text:
> aaaaaaaaaaaaammmmmmmmmmmmmmmmmmmmmmmmmmmzzzzz
Looks somewhat odd. I wonder what it means. Generally, when you have such a
problem, it's best to consider whether the content is meaningful and how it
might be changed.
> and its displayed in container that (with this font etc) will hold up
> to 10 characters (or will overflow etc which is bad).
"Doctor, it hurts when I do this."
"Then don't do that."
That is, why do you create the problem by squeezing something into a narrow
area where it cannot fit?
More info: http://www.cs.tut.fi/~jkorpela/html/nobr.html#suggest
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: Manual break
am 19.08.2007 20:49:43 von Michael Fesser
..oO(Rafa³ Maj)
>is there a html entity or something that tells browser where it can brake
>text when lacking white spaces?
Micha
Re: Manual break
am 19.08.2007 21:25:26 von jkorpela
Scripsit Michael Fesser:
> .oO(Rafa³ Maj)
>
>> is there a html entity or something that tells browser where it can
>> brake text when lacking white spaces?
>
>
That's soft hyphen, which is ignored by Firefox and treated as a
_hyphenation_ hint by most other browsers.
foobar produces, when it does not fit,
foo-
bar
(notice the hyphen) whereas foobar produces, when it does not fit,
foo
bar
(notice the lack of hyphen).
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: Manual break
am 20.08.2007 00:00:33 von Michael Fesser
..oO(Jukka K. Korpela)
>Scripsit Michael Fesser:
>
>> .oO(Rafa³ Maj)
>>
>>> is there a html entity or something that tells browser where it can
>>> brake text when lacking white spaces?
>>
>>
>
>That's soft hyphen, which is ignored by Firefox
Firefox 3 will support it, most other modern browsers already do.
>and treated as a
>_hyphenation_ hint by most other browsers.
Correct, but that's what I think the OP wants. Of course it's just a
guess, but it's the one that makes the most sense to me.
Micha