Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25

Thread: Help Please -- How To Center A Block Of Text (Maintaining Flush Left)

  1. #16
    Join Date
    Feb 2014
    Rick, actually it did come through. That (the code) was what showed up in my Preview.

    Beyond that now, here's a link to an old 2010 ad of mine on the Warrior Forum. You can easily see "inspect element." That's a start.

    I guess you're not a member; then you could see (for sure) what happens trying to center a block of text in Preview. Maybe just seeing their platform will be enough.

    If you got back to me by late tonight that would be fine. Being Monday I don't expect anything during the day.

    Thanks again (to Error404 too) Rick.


  2. #17
    Join Date
    Feb 2014
    Error404 and Rick,

    First, I apologize for getting you both involved. Thanks so much.

    Strange, Error404; I just did send a link a few minutes before you last post minutes ago. I thought you were replying to that. I'll do it again.

    (Rick, you said your code showed up when I sent you the last result last night. That's actually what showed up in my Preview for whatever reason. I guess we're beyond that now since I'm including a link to a similar page (Warrior Forum platform) here.)

    Here's a link to an old ad on the Warrior Forum from 2010. Even idiot me could see "inspect element."


    I'll be away a little while this morning. I certainly don't expect a response during the day as it's Monday. Tonight would be more than fine considering both your available time..


  3. #18
    Join Date
    Feb 2014
    PS The code you both saw was vastly generated by the website (I just highlighted and clicked); I added additional code. Result: a mess, but it showed up fine, except for the centering problem.

  4. #19
    Join Date
    Feb 2014
    The formatting used in your post via the link is relatively straight-forward and fairly easy to manually duplicate, so that's not a terrible issue. Copying and pasting that code into a webpage may not work if the webpage uses HTML5 (i.e. modern webpages), however, many forums still use that syntax and will accept it. If you're getting everything to work except for the positioning on the screen, you can use the CSS properties of text-align and float. Keep in mind, when using float, you may want to use clear: both/left/right for subsequent elements as their positioning may be affected by the floated element. You can find some examples online of float but keep in mind, it only works for left and right, not top, center and bottom (although there are different work-arounds to achieve that effect).

  5. #20
    Join Date
    Jan 2014
    Boston, Massachusetts
    What is the website URL that you're having this problem on? If it's just in development, post a bit of code to codepen.

    All I can think of is whatever element the text is in needs to be centered. Give the body a width, and set the element as follows, using a div as an example

    div {
    margin: 0 auto;
    padding: 5px;
    width: auto;

    That should center the text container and the text inside will be left-aligned. Width: auto may not be necessary. Try with and without.

  6. #21
    Join Date
    Feb 2014

    I just got to look at your post. I'll digest all that, see what I can accomplish and respond in the near future.

    Thank you.


  7. #22
    Join Date
    Feb 2014
    Hi 404,

    As I replied to your previous post, I'll work on this and get back to you (and the others) in the near future.



  8. #23
    Join Date
    Feb 2014
    Thanks winthropite,

    I'll take your information into account and respond to you too in the near future.

    The website URL (my page) is:


  9. #24
    Join Date
    Feb 2014
    Hi Rick,

    I'm going over different suggestions now. I'm a little sleepy and forgot if I sent you a URL to look at. Here it is.


    I'll let you know what happened in the near future.

    Thanks again.


  10. #25
    Join Date
    Feb 2014
    Sorry I couldn't reply more last night. If it's a matter of having some content aligned to the center and other stuff to the left, then try the following code (try resizing the browser as well to see how it will adjust horizontally). Hopefully it helps. Once that is done, you can apply the necessary colouring and any text formatting as you wish. Added in some comments in the code to help you out, hopefully it does what you're after.

    HTML Code:
    <!DOCTYPE html>
    				width: 50%;
    				height: 400px;
    				clear: both; <!-- in case you want to have other left or right-aligned stuff around, this div won't be affected by it -->
    				zoom: 1; <!-- helping out IE here -->
    				width: 20%;
    				margin: 0 auto;
    				float: left;
    				position: absolute;
    				top: 80px;
    				<!-- format the designated paragraphs (color, bold, size, etc...) -->
    		<div id = "outer">
    			<div id = "inner">
    				<p class = "text">stuff to center</p>
    			<p id = "p1" class = "text">stuff to left</p>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.16288 seconds
  • Memory Usage 2,952KB
  • Queries Executed 15 (?)
More Information
Template Usage (36):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (10)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (75):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates