vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Limit width of posts (number of characters per line) (https://vborg.vbsupport.ru/showthread.php?t=160548)

JtChurch925 10-19-2007 01:49 AM

Limit width of posts (number of characters per line)
 
Is it possible to limit how many characters wide the posts can be? For instance, on a larger or wide-screen monitor the posts don't stretch all the way across the screen, but word wrap somehow? Or set a limit on how many characters can appear on one line, forcing a return?

The reason I want to do this of course, is that having text on a screen stretching for more than 6 or 8 inches across a screen can be difficult to read. Slimmer columns of text seem easier to read.

Any ideas?

Freesteyelz 10-19-2007 03:42 AM

If you'll settle for a set width instead of set characters than one method is to control the postbit(_legacy) width by using CSS:

Code:

  <!-- message -->
  <div id="post_message_$post[postid]" class="msgwidth">$post[message]</div>
  <!-- / message -->

Add the red. Then in Main CSS and at the very bottom Additional CSS add:

Code:

.msgwidth {
  width:500px;
  }

Change "500px" to whatever pixel size you want. The above code will only control the message.

If you want the other message contents (e.g., title, attachments, signature...) to confine to the set width then add that class to the relevant "div" tags. Or simply add in red (and don't do the above steps):

Code:

<td class="alt1" id="td_post_$post[postid]">
 <div class="msgwidth">
 <!-- message, attachments, sig -->

And

Code:

<!-- message, attachments, sig -->
 </div>
 </td>


JtChurch925 10-19-2007 10:53 AM

Excellent reply, I think that will work. I'm going to try it today and post my results. Thanks again!:up:


All times are GMT. The time now is 11:37 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01039 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete