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.
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.