Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

How to change this ?

Aloittaja smtek, elokuu 21, 2011, 04:11:00 AP

« edellinen - seuraava »

smtek

Can you tell me how to modify the color of the category bar color.
Here is the image:


How to change its color.
http://thetekwar.com

^ Your entry to the best tech community

Ricky.

This is actually an image,
You should  check out /default/images/theme/main_block.png

Hj Ahmad Rasyid Hj Ismail

There are basically two parts in index.css to change:
div.cat_bar {
    background: url("../images/theme/main_block.png") no-repeat scroll 0 -160px #99ABBF;
    height: 31px;
    margin-bottom: 1px;
    overflow: hidden;
    padding-left: 9px;
}

h4.catbg, h4.catbg2, h3.catbg, h3.catbg2, .table_list tbody.header td.catbg {
    background: url("../images/theme/main_block.png") no-repeat scroll 100% -160px transparent;
    padding-right: 9px;
}

You can replace them with another image or you can use css to change its color.

In my new Revamp SMF theme, I change the first part to :
div.cat_bar {
    background-color: #556AB0;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 1px rgba(255, 255, 255, 0.3) inset, 0 10px rgba(255, 255, 255, 0.2) inset, 0 10px 20px rgba(255, 255, 255, 0.25) inset, 0 -15px 30px rgba(0, 0, 0, 0.3) inset;
    height: 31px;
    margin-bottom: 3px;
    overflow: hidden;
    padding-left: 9px;
}

And I just cleared the second part so that it won't be redundant, like this:
h4.catbg, h4.catbg2, h3.catbg, h3.catbg2, .table_list tbody.header td.catbg {
    padding-right: 9px;
}

It is really up to you on how to change it.

Note: box-shadow is will change a simple color to make it look like an image; while border-radius will make it curves.

Advertisement: