James
James

Reputation: 43617

Disable word wrapping in the end

I have a block with some text and image inside.

Like:

<div>I just posted a new photo from my iPhone <img></div>

Image in the end has dimensions of 16x16.

The problem is, text varies and sometimes >just image< goes to a new line. It should always go with some word, image must not travel alone.

How do I do it?

Upvotes: 2

Views: 1121

Answers (2)

jsejcksn
jsejcksn

Reputation: 33691

You could also try white-space: nowrap in your CSS. This prevents line wraps in your paragraphs.

Upvotes: 0

Tomalak
Tomalak

Reputation: 338118

Use a non-breaking space:

...from my iPhone&nbsp;<img>...

Upvotes: 5

Related Questions