Jeff
Jeff

Reputation: 143

non-breaking space in link

In a subnavigation of a Website I try to have the link Suite «Mont Blanc», which was read out of the Backend to be wrapped like this:

      Suite
«Mont Blanc»

And not:

  Suite «Mont
      Blanc»

I know there is   but if I insert that in the Structure-Element Name (which is listed as a link), the link will not work properly anymore.

Is there a kind of invisible non-breakable space I could use?

Upvotes: 0

Views: 2952

Answers (3)

G.L.P
G.L.P

Reputation: 7207

Use like this: Demo

CSS:

span{
    white-space: nowrap;
}

HTML:

Suite
<span>«Mont Blanc» </span>

EDIT:

If you need span content in next line You can try like this: Demo

span{
    clear:both;
    display:block;
    white-space: nowrap;
}

Upvotes: 2

bytecode77
bytecode77

Reputation: 14820

You could wrap it in a span like this:

Suite<br />
<span style="white-space: nowrap;">«Mont Blanc»</span>

The white-space: nowrap; CSS prevents wrapping, even if the outer div is smaller than the text.

Upvotes: 0

ak_
ak_

Reputation: 2815

Use CSS to prevent wrapping:
white-space: nowrap;

Upvotes: 1

Related Questions