Quantcast
Channel: Myskins Studio - Free MyBB Themes, Custom MyBB Themes and Premium MyBB Themes - All Forums
Viewing all articles
Browse latest Browse all 5470

Multiple Colored Category Headings/ Thead MyBB

$
0
0
Hello,
friends,
As requested by our friend Zwiv, i am making this tut for Multiple color category background / Thead for MyBB.
It requires knowledge in template editing and is very simple,

First as always the HTML.
Navigate to Templates > forumbit templates > forumbit_depth1_cat template.

Look for this code on 4th line.
Code:
<td class="thead" colspan="5">

Replace with:
Code:
<td class="thead" colspan="6" id="forum_cat_{$forum['fid']}">

So copy paste business lets you learn nothing. So here i explain what you are exactly doing.
You are assigning an ID for the category heading. As ID's are unique, they tend to have a property of assigning themselves to a particular element.

Now its Css time :
So you have to look for number of categories you have.
Look for their ID's in the admin panel > forums.

So every category needs to be having a particular ID and insert in following code:
Code:
#forum_cat_x {background:#D12C2C;}

x="ID Number of the Category.

For example:

The first forum cat ID is 1 then you have to insert the ID within the following code:
Code:
#forum_cat_1 {background:#111;}

So the next category has an ID 8 then the code becomes :
Code:
#forum_cat_8 {background:#222;}

So you have to assign color to every category you have and thus you can achieve multiple clored Thead/ Category Heading Backgrounds.
You can add images instead of colors too., instead of colors #xxxxxx
you need to add the image path ex: url(images/xx.png);

So if you enjoy this feel free to share it with your friends, with credits to me.
Thank you
regards

Viewing all articles
Browse latest Browse all 5470

Trending Articles