Jump to content

Change Tab Color

Recommended Posts

In the admin skin file layout.css, near line 463, is a style rule for all tabs. Then, near line 489, is a style rule for the tab that is selected.

A tab has a background that is light-grey, unless selected, which is white.

Unfortunately, there is nothing in the HTML code that the browser could use to positively identify that any page is for anything specific: categories, products, documents, etc.

So, we will try to have Smarty add styling if a certain condition applies.

In the admin skin template main.php, near line 60, find:

         <div id="content">
            <div id="tab_control">

On a new blank line after that, add:

              {if $smarty.get._g eq "products"}
                #content #tab_control div.tab {
                  background-color:#DDF !important;
                #content #tab_control div.tab-selected {
                  background-color:#AAF !important;

This tests if the web address, in the querystring, has _g=products, then put in the styling.

Pick your own selected and non-selected tabs' background colors.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...