Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Fixed Main Table Width
amjadz4's Avatar
amjadz4
Join Date: Aug 2007
Posts: 245

 

Show Printable Version Email this Page Subscription
amjadz4 amjadz4 is offline 12-29-2009, 10:00 PM

Okay so some themes come only with one width i.e 100% which fills up the screen. Like me, many want to match their website and want the width of the main table to be fixed. So how to adjust the width of the CMS, Blog and Forum all together?

vBulletin 3 had an easy way to do it, under Main CSS of the template. But in vB 4 its a bit different. Follow these steps to adjust the width of your vbulletin.

1. Log into AdminCP
2. Navigate to Styles & Templates > Your style > StyleVars
3. In the search field type in doc_width (under Common).
4. Now set the Units and Size as per your requirement, and Save. (default: auto)

That's it!

Now if at all for some reason your theme is not center aligned after adjusting the width do this:
  • Type doc_margin in the search field.
  • Set Left & Right to auto
Now you have your CMS, Blog and Forum center aligned to the width of your choice!

# Additional tip from anthony parsons:
Quote:
Originally Posted by anthony parsons View Post
And don't forget to untick the "Use top margin for all sides" box, otherwise it will force left alignment.
Reply With Quote
  #2  
Old 01-01-2010, 08:10 AM
anthony parsons anthony parsons is offline
 
Join Date: Apr 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And don't forget to untick the "Use top margin for all sides" box, otherwise it will force left alignment.
Reply With Quote
  #3  
Old 03-30-2010, 04:14 AM
sk8ordie778 sk8ordie778 is offline
 
Join Date: Mar 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works perfect but for some reason my CMS is staying 100% forum and blog are fixed though. Any ideas?
Reply With Quote
  #4  
Old 03-30-2010, 06:30 AM
amjadz4's Avatar
amjadz4 amjadz4 is offline
 
Join Date: Aug 2007
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sk8ordie778 View Post
This works perfect but for some reason my CMS is staying 100% forum and blog are fixed though. Any ideas?
Try changing values of doc_maxwidth & doc_minwidth.
Reply With Quote
  #5  
Old 03-30-2010, 07:13 AM
sk8ordie778 sk8ordie778 is offline
 
Join Date: Mar 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply.

I tried putting them on auto, and different pixel ranges still didn't work. What's weird is my title image I have set doesn't work for the CMS but works in my forum and blog. Does that give you any other clues?

Here's the site if you wanna take a look. http://skatecolony.com/forums/
Reply With Quote
  #6  
Old 03-30-2010, 09:28 AM
amjadz4's Avatar
amjadz4 amjadz4 is offline
 
Join Date: Aug 2007
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sk8ordie778 View Post
Thanks for the reply.

I tried putting them on auto, and different pixel ranges still didn't work. What's weird is my title image I have set doesn't work for the CMS but works in my forum and blog. Does that give you any other clues?

Here's the site if you wanna take a look. http://skatecolony.com/forums/
The site shows 100% width. What unit are you using? Try making 900 px for doc_width and doc_maxWidth.
Reply With Quote
  #7  
Old 03-30-2010, 03:40 PM
sk8ordie778 sk8ordie778 is offline
 
Join Date: Mar 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ya I tried 900 px for both doc_width and doc_maxWidth. Still no change for the Home. I also tried creating a brand new style, put in my title image and changed the doc_width and doc_maxWidth to 900 and still home is at 100% in this new style.

Ok I just had a thought. When I opened up a new browser and I was not logged in to the site. The site shows me the default style layout which I think is what you saw. When I look at the site only the Home page is 100% forum/blog are at 1000px like I want.
I don't have default layout check marked and I have it set as the third style ID. Is there some option that could be hanging up the site to display the default layout and not my custom one?

I also just noticed when I open up another browser FF or IE and I go to my site my custom style does not show. But it displays fine in crome (the browser I've been doing testing in) this is probably because of cookie settings im assuming. I have my custom style checked under the style manager so shouldn't that be the default layout visitors see?
Reply With Quote
  #8  
Old 03-30-2010, 04:04 PM
amjadz4's Avatar
amjadz4 amjadz4 is offline
 
Join Date: Aug 2007
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sk8ordie778 View Post
Ya I tried 900 px for both doc_width and doc_maxWidth. Still no change for the Home. I also tried creating a brand new style, put in my title image and changed the doc_width and doc_maxWidth to 900 and still home is at 100% in this new style.

Ok I just had a thought. When I opened up a new browser and I was not logged in to the site. The site shows me the default style layout which I think is what you saw. When I look at the site only the Home page is 100% forum/blog are at 1000px like I want.
I don't have default layout check marked and I have it set as the third style ID. Is there some option that could be hanging up the site to display the default layout and not my custom one?

I also just noticed when I open up another browser FF or IE and I go to my site my custom style does not show. But it displays fine in crome (the browser I've been doing testing in) this is probably because of cookie settings im assuming. I have my custom style checked under the style manager so shouldn't that be the default layout visitors see?
Okay I do not have a big screen on my laptop (14") .. so I could not make it out. Anyways, tell you what, if you really want to fix the issue, you can contact me via PM with your admin details, because I need to look into the settings and theme stylevars etc to find the problem. Can't really say what could be wrong from here!

Regards.
Reply With Quote
  #9  
Old 03-30-2010, 04:42 PM
sk8ordie778 sk8ordie778 is offline
 
Join Date: Mar 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PM sent thanks for the help I really appreciate it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:36 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.03988 seconds
  • Memory Usage 2,275KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete