Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 29, 2008 06:04
open dhtmlx forum
contextMenu background color

Hello,

I am using following code to attach context menu for grid.

var aMenu=new dhtmlXContextMenuObject("160",0,"");
aMenu.menu.tableCSS="menuTable1";

where as styles.css has class menuTable1

.menuTable1{
    background-color : white;
    border-bottom : solid #808080 1px;
    border-left : solid #FFFFFF 1px;
    border-right : solid #808080 1px;
    border-top : solid #d4d0c8 1px;
    margin : 0px;
    -moz-user-select : none;
    padding : 0px;
    
}

but the context menu is using menuTable from dhtmlxmenu.css

How can I change the background color of the contextmenu without changing the dhtmlxmenu.css ?

Thanks.
Answer posted by Support on Dec 29, 2008 16:28
Context menu doesn't support such way of configuration as in your sample above, just use the same structure with two css files, but
a) rename
    .menuTable1{
with
    .menuTable
in styles.css
b) be sure that styles.css included after dhtmlxmenu.css

The rule which defined later ( yours ) will override earlier one ( default ) , so you will be able to use custom styling without any modification in default files.