<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:
post_body
div can stay consistent every time.How can I do this?
Thanks!
To turn a dynamic wrap (Detect Edges or Alpha Channel) into a User-Modified Path, click on the image with the Direct Selection Tool so you can see the wrap's path, then adjust the path. Work on a part of the path that's not interacting with text to avoid problems.
You can just use CSS and set the width of the div to a specific amount. When the text gets to big to fit the width of the DIV tag it will just wrap.
To adjust the font size you'll have to get crazy with javascript. Personally I would just set a height to the DIV tag as well and set the CSS overflow-y to auto, which will cause the div to scroll once there is to much text to fit the DIV tag dimensions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With