DHTMLX Docs & Samples Explorer

### Custom colors

You can set background color for active and other tabs using setSkinColors method ( works not for all skins )

|  |  |

Source

    <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtabbar.css">
    <script  src="../../codebase/dhtmlxcommon.js"></script>
    <script  src="../../codebase/dhtmlxtabbar.js"></script>

    <table width="500px">
        <tr>
            <td>
                <div id="a_tabbar" style="width:100%; height:50px;"/>
            </td> </tr>
            <td>
                <div id="b_tabbar" style="width:100%; height:50px;"/>
            </td> </tr>
            <td>
                <div id="c_tabbar" style="width:100%; height:50px;"/>
            </td> </tr>
            <td>
                <div id="d_tabbar" style="width:100%; height:50px;"/>
            </td> </tr>
    </table>
    <br>
    <script>tabbar = new dhtmlXTabBar("a_tabbar", "top");
    tabbar.setImagePath("../../codebase/imgs/");
    tabbar.loadXML("../common/config.xml");
    tabbar2 = new dhtmlXTabBar("b_tabbar", "top");
    tabbar2.setImagePath("../../codebase/imgs/");
    tabbar2.loadXML("../common/config.xml");
    tabbar2.setSkinColors("#FFFF00", "#FFFACD");
    tabbar3 = new dhtmlXTabBar("c_tabbar", "top");
    tabbar3.setImagePath("../../codebase/imgs/");
    tabbar3.loadXML("../common/config.xml");
    tabbar3.setSkinColors("#7FFF00", "#9ACD32");
    tabbar4 = new dhtmlXTabBar("d_tabbar", "top");
    tabbar4.setImagePath("../../codebase/imgs/");
    tabbar4.loadXML("../common/config.xml");
    tabbar4.setSkinColors("#FF69B4", "#FFC0CB");</script>