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 6027577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:36:47+00:00 2026-05-23T04:36:47+00:00

<div rownumber=0 messageid=141 class=post style=position: relative; top: 0px;> <div class=post_body>testbox</div> <div class=post_info style=top: 0px;>

  • 0
<div rownumber="0" messageid="141" class="post" style="position: relative; top: 0px;">
    <div class="post_body">testbox</div>
    <div class="post_info" style="top: 0px;">
        <ul>
            <li class="vote" id="voteli"><a href="#">vote up</a></li>
            <li class="flag" id="flagli"><a href="#">flag</a></li>
        </ul>
    </div>
</div>

So, these div’s are generated on the fly, and placed into a container div on the front end. These are generated on the backend and are returned as HTML through Json.

The div class="post_body" is what holds the user message, current the one that says ‘testbox’. Now, the issue I’m having is, when a user writes a message that extends beyond the width of the div, it just keeps going, it doesn’t bump onto the second line.

Here’s the two things I want to achieve:

  1. I want to make sure when the text doesn’t fit horizontally, it goes onto a second line within the same div.
  2. I want to shrink the text if it needs to go on two lines that way the height of the post_body div can stay consistent every time.

How can I do this?

Thanks!

  • 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-05-23T04:36:48+00:00Added an answer on May 23, 2026 at 4:36 am

    No one else is doing it, so I will.

    I used this which was stated in the comments and it works.

    Auto-size dynamic text to fill fixed size container

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

Sidebar

Related Questions

<div rownumber=0 messageid=112 class=post style=position: relative; top: 0px;> <div class=post_body>hey hey hey</div> <div class=post_info
<div id=container> <div rownumber=0 messageid=155 class=post style=position: relative; top: 0px;> <div class=post_body><span>asdfjhasf as dfkhgfk
<div rownumber=0 messageid=29 style=margin:1px 1px 1px 1px; border:1px solid black> <input type=button value=Vote id=vote>
div#thing { position: absolute; top: 0px; z-index: 2; margin: 0 auto; } <div id=thing>
Div 'canvasesdiv' element contains three HTML5 canvases. <div style=position: relative; width: 400px; height: 300px;
Header div on top of the 3 columns Height of all columns must fill
$('div.box').html(hello) puts the word hello inside all my div's of class 'box'. They all
struct Div { int i; int j; }; class A { public: A(); Div&
A div with position: fixed is embedded into a parent div . When the
%div{:class => [@item.type, @item == @sortcol && [:sort, @sortdir]] } Contents could render as

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.