Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9088157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:51:32+00:00 2026-06-16T21:51:32+00:00

I need to wrap text around an image, this text may contain a very

  • 0

I need to wrap text around an image, this text may contain a very long word (medicine names).
I’m doing the obvious and have been trying with few other things but this is how my current code looks.

<div style='width:120px;'>
    <img scr="myImage.png" style='float:right;width:50px;'>
    <p style='word-wrap:break-word;'>This_is_the_very_long_word_without_hyphens_I_need_to_wrap_.</p>
    <p>This is a normal paragraph of text that needs to flow around the image if there is space available. Leaving the option of tables out of question and specially because the height of the image may vary and don't want a huge white space between the paragraphs.</p>
<div>

So, the word will wrap on the div but under the image :(.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:51:33+00:00Added an answer on June 16, 2026 at 9:51 pm

    Instead of word-wrap: break-word, which literally br eaks wo rds, use hyphens: auto and back it up with browser-prefixed versions and JavaScript-based hyphenation. Example (with corrected and augmented markup):

    <!doctype html>
    <html lang=en>
    <script src=
    "http://hyphenator.googlecode.com/svn/tags/Version%204.1.0/Hyphenator.js">
    </script>
    <script type="text/javascript">
    Hyphenator.config({useCSS3hyphenation: true});
    Hyphenator.run();
    </script>
    <style>
    .hyphenate { -moz-hyphens: auto; -ms-hyphens: auto; hyphens: auto; }
    </style>
     <div style='width:120px;'>  
        <img src="myImage.png" alt="" style='float:right;width:50px;'>
        <p class=hyphenate>Xylometazoline
        <p>This is a normal paragraph of text...</p>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Situation is simple. I need to wrap text around two inline objects (buttons with
I need to simply wrap long text to display it in a few lines.
I would like to create this layout in Silverlight. The text need to wrap
What I need is to wrap HTML around a current div, this is what
I have a fluid page (100% width) with this inside: [image-fixed-width] | [text-fluid-width -----------------------------------]
I'm trying to get a bunch of div's to wrap around an image, but
I need to wrap everything, including free text, that is between two <hr> elements.
I need to wrap text inside a div with a span. <div class=item> <span
I have a NSTextView subclass. It displays normal text (which should wrap, ideally around
I'm using jQuery UI's Dialog. In order to very nicely wrap the window around

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.