Существует ли в HTML+CSS общий способ подавления разрывов строк между определенными символами?CSS

Разбираемся в CSS
Ответить Пред. темаСлед. тема
Гость
 Существует ли в HTML+CSS общий способ подавления разрывов строк между определенными символами?

Сообщение Гость »


Стандартные сноски Википедии создают HTML вида:

Код: Выделить всё

Here is an example sentence with a footnote.[1] And continue...
The result generally looks like:

Here is an example sentence with a footnote.[1] And continue...

If the RH side of the display comes close after "footnote." then the result is either:

Here is an example sentence with a footnote.[1]

And continue...

or

Here is an example sentence with a

footnote.[1] And continue...

It always looks humanly clean: it holds together the full stop and superscripted footnote reference so that it never line-breaks. Try it. With any Wikipedia article, gradually resize the browser horizontally so that the text reflows. Observe how the relevant part (equivalent to "footnote.[1]") is never subject to line-breaking.
Yet my own very simple HTML/CSS is subject to line-breaking, so that if the screen width needs to break immediately after the word-plus-full-stop "footnote.", the output can then be the ugly:

Here is an example sentence with a footnote.

[1] And continue...

Yet somehow Wikipedia's simple

Код: Выделить всё

...footnote.[1]
achieves its cleanness. Note that it is that simple; no or similar. What are the relevant parts of HTML (probably more likely CSS), please?
I've had a look through the HTML and some of the CSS, but cannot see how they achieve this suppression of line-breaking at such points.
Nor can I see in the HTML and CSS documentation how to achieve it.


Источник: https://stackoverflow.com/questions/781 ... tain-chara
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «CSS»