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

  • Home
  • SEARCH
  • 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 8618493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:07:27+00:00 2026-06-12T06:07:27+00:00

I have a div, which consists of words with different styles applied to text

  • 0

I have a div, which consists of words with different styles applied to text segments.

I am trying to implement a layout such that if the text exceeds the width of the div, it should go over to the next line.
Basically: No word break
Also, the key here is to make sure that a word never breaks, if the whole word can’t fit inside the div horizontally, it should move over to the next line.

We can assume that the width is atleast more than the width of the longest word.

http://jsfiddle.net/cH5tN/15/

  • 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-12T06:07:28+00:00Added an answer on June 12, 2026 at 6:07 am

    You should do two things. Use the css property 'white-space: no wrap' and nest the stylized letters within a single span. Here’s the updated fiddle http://jsfiddle.net/cH5tN/44/

    EDIT:

    Also, you should avoid non-breaking spaces, just use a space unless there’s a specific reason you wouldn’t want the text to break on a particular space.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a partial view which consists of a div with a benner that
I have such a table: <table> <tr> <td> My text which consists of three
I have a div which contain lots of input[type=text] fields. I want to put
I have a navigation bar which consists of php-generated html as follows: <ul> <div
I have a MenuButton which consists of a Image and a Text under the
I have some divs which are structured like this: <div> <div><a>more Info</a></div> <div><a>more segments</a></div>
this may sound simple, I have made a div block which consists of buttons
In my web-application i have a div which loads another page: $('#main').load('pages/main.php'); main.php consists
I have a div element which consists of list elements eg: java, ror, .NET.
I have a layout which consists of menu on left and main content in

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.