You may want a certain image to remain always in the same line with one or more words. The usual non breaking space HTML tag ( ) works only between words, not between an image and a word.
Remember this ghost tag, <nobr>! It won’t work either! No joy to try also adding this CSS property, white-space:nowrap.
There is a CSS way to go, a simple one, the inline-block display property, which you can have in span tags as it is, or by defining a class, in case you need this image+text element often.
For example,
<span style="display:inline-block;"><your whatever IMG tag> AnyWord</span>.
In this example, “AnyWord” remains at the right of an image always; the space that precedes it won’t ever make it sink to a different line.
Enjoy!
Related Posts:
- Insert silence between tracks in Winamp with Pause Between Songs plugin
- Experience space flight and orbital mechanics, with Orbiter 3D Space Flight Simulator
- Reveal marked index entries in MS Word without displaying all non printing characters
- Convert between 1277 measurement units, even add custom units, with ConverBer
- MS Word: how to increase distance between header and main text
- Non stop copy and even recover data from damaged media, with Copy Cat
- Detect and save non-microsoft drivers, with Smart Driver Backup
- Batch uninstall a lot of programs and apps, even portable or non-registered, with Bulk Crap Uninstaller
- Edit UML and non-UML diagrams saving as SVG or PNG, with PlantUml
- Resize non resizeable windows, with Resize Enable
- Visualize your ideas in Mind Maps for brainstorming non-linear thinking, with FreeMind
- Write a musical score even with non-standard notation, using LilyPond