Hi. I want to set the button widths of a toolbar in percentages.
Like:
This code is working well in IE. But in firefox, the width of each button is half of the expected.
This m8 be happening because of the highlighted line of the following code in dhtmlxtoolbar.js
[i]dhtmlXToolbarObject.prototype._create_self=function()
{
if(!this.width) this.width=1;
if(!this.height) this.height=1;
var div=document.createElement("div");
div.innerHTML='<table cellpadding="0" cellspacing="1" class="'+this.tableCSS+'" style="display:none" width="'+this.width+'" height="'+this.height+'"><tbody>' +
'<tr>'+
'<td width="'+(_isFF?5:3)+'px"><div class="toolbarHandle" '+(_isIE&&!this._isIE7s?"style='width:1px'":"")+'> </div></td>'+
'<td class="'+this.titleCSS+'" style="display:none">'+this.name+'</td>'+
'<td></td>'+
[b] '<td align="right" width="100%" class="'+this.titleCSS+'"[/b] style="display:none">'+this.name+'</td>'+
'<td></td>'+
'</tr></tbody></table>';
var table=div.childNodes[0];
table.setAttribute("UNSELECTABLE","on");
table.onselectstart=this.badDummy;
this.topNod=table;
this.dividerCell=table.childNodes[0].childNodes[0].childNodes[0];
this.dividerCell.toolbar=this;
this.preNameCell=this.dividerCell.nextSibling;
this.firstCell=this.preNameCell.nextSibling;
this.nameCell=this.firstCell.nextSibling;
this.crossCell=this.nameCell.nextSibling;
this.parentObject.appendChild(table);
};[/i]
The width of the last
And FYI, the code below has a typo :
[i]dhtmlXToolbarObject.prototype._create_self_vertical=function()
{
if(!this.width) this.width=1;
if(!this.height) this.height=1;
var div=document.createElement("div");
div.innerHTML='<table cellpadding="0" cellspacing="1" class="'+this.tableCSS+'" style="display:none" width="'+this.width+'" height="'+this.height+'"><tbody>' +
'<tr><td [b]heigth[/b]="'+(_isFF?5:3)+'px"><div class="vtoolbarHandle" style="width:100%; '+(_isIE?"height:3px":"")+' overflow:hidden"></div></td></tr>'+
'<tr><td height="100%" class="'+this.titleCSS+'" style="display:none">'+this.name+'</td></tr>'+
'<tr><td></td></tr>'+
'<tr><td align="right" height="100%" class="'+this.titleCSS+'" style="display:none">'+this.name+'</td></tr>'+
'<tr><td></td></tr>'+
'</tbody></table>';[/i]