Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
How to Align Titles for Categories and Forums (and other formatting)
cheat-master30's Avatar
cheat-master30
Join Date: Mar 2007
Posts: 1,715

Favourite Quotes: In the last moments of the finale of the finale when relief leads to neglience that begets rashness... That is when the comeback that faltered comes back and beats you - Fawful

Information Classified
Show Printable Version Email this Page Subscription
cheat-master30 cheat-master30 is offline 06-01-2008, 10:00 PM

Since it has been requested in terms of how to align or format various things on the forum home page of a vBulletin forum, including how to centre the text in the category titles, this article is a hopefully useful solution which is somewhat practical in it's application.

Understanding what CSS titles each element is given in the CSS:

As can be seen on the below diagram, there are a lot of possible things to change on a typical vBulletin home page, and they are:

Main Body of page: Refers to everything outside the main table for a vBulletin forum, and the general page display for just about any document. To edit the properties of this, you would go to the section like this in the code:

body{
}

Or the section called 'Body' in the Style Manager options.

Page: The class called this refers to the main table as a whole, and should normally be changed in terms of colours and such like.

Forum Categories:

The category headers are referred to as .tcat in the CSS, and are of said class. This refers to the section on a forum which says the category name above the list of forums in that category. At vBulletin.org, this would refer to this section:

Quote:
News And Announcements
Click here to view the latest topics
To centre or format this section, you'd use these kinds of CSS properties:

text-align: Controls alignment of the text in the category titles.

font-style: Italics and such like.

font-weight: Bold and various shades of bold text.

text-decoration: More text styles like underline, overline and blinking text.

As well as things like background properties for things like what image is used in the background or the background colour. Or the color property for the text colour.

Table Headers come under the thead class in the CSS, and can be formatted by applying properties and styles to this class in the code or style manager.

The forum name and description section comes under alt1 in the CSS, as does the forum thread count, forum notice text, forum statistics text, who's online and todays birthdays.

The last post and login area, as well as forum, birthday, users online and statistics icons come under the alt2 class in the text.

To make it a bit more confusing, the navbar in the CSS does not refer to the forum navigation bar which says 'calendar' or 'members list', but the breadcrumbs linking to each section of the forum as you go from home page to forum to topic. This navbar is nested within the alt1 class in the CSS.

The area with links to the contact form, archive, site home page and more as well as the forum leaders page links and some other sections come under tfoot in the CSS.

And the section with headings saying forum, last post, etc comes under thead in the CSS.

How to Apply Certain Formatting to a section:

Now you know what sections are referred to as what, here are some examples of how to edit the display of a section:

Centering Category Titles

Simply add this to the tcat class or Category Strips section in the Style Manager:

text-align: center;

Before:

Attachment 81672

After:

Attachment 81673

Chart of what refers to what

Attachment 81671

Other Related Stuff:

Blog CSS Properties (home page): tcat is for the part saying 'Blogs by...', recent comments, posts, options, blog entries search, blog statistics and blog archive are formatted by the property of thead, posted in, find more and advanced search have class of alt2 and anything else is of class alt1.

Search Page CSS Properties (main page): alt1 (most things), tcat (tag search and search main headings), panelsurround, panel and fieldset.

Calendar CSS Properties: Uses alt1, 2, tcat for main category headings and thead for some others as well as vbmenu_control.

Guide to Profile Styling:

https://vborg.vbsupport.ru/showthread.php?t=152255

Hope this helps some people style the various sections in their vBulletin forums easier.

Thanks to

Jelsoft for making vBulletin, and the staff of vBulletin.org

Firebug for helping with identification of what section comes under what CSS class.

HTMLDog for HTML and CSS references.
Reply With Quote
  #2  
Old 06-03-2008, 11:50 AM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

helpful article - thank you :up:
Reply With Quote
  #3  
Old 06-03-2008, 02:05 PM
cheat-master30's Avatar
cheat-master30 cheat-master30 is offline
 
Join Date: Mar 2007
Location: Information Classified
Posts: 1,715
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I also hope the full CSS labelling diagram helps some people.
Reply With Quote
  #4  
Old 06-08-2008, 08:07 PM
cheat-master30's Avatar
cheat-master30 cheat-master30 is offline
 
Join Date: Mar 2007
Location: Information Classified
Posts: 1,715
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, anyone got any improvements to this article or comments? Like an annotated image of the Postbit templates with references to the CSS IDs and classes?
Reply With Quote
  #5  
Old 06-12-2008, 08:13 PM
cheat-master30's Avatar
cheat-master30 cheat-master30 is offline
 
Join Date: Mar 2007
Location: Information Classified
Posts: 1,715
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to be nice, here's another labelled diagram, this time of menus and polls:
Attached Images
File Type: jpg menus.jpg (84.1 KB, 0 views)
Reply With Quote
  #6  
Old 01-05-2012, 09:29 PM
cstreater cstreater is offline
 
Join Date: May 2010
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The charts you posted are extremely helpful. Thanks for doing this.
Reply With Quote
Reply

Thread Tools

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 01:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05876 seconds
  • Memory Usage 2,264KB
  • Queries Executed 22 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete