Posted by: sreddy2u | January 31, 2008

CSS display style Problem with Mozilla

//
//js code.
//

labelSpan = document.createElement(‘span’);
try{
// labelSpan .style.display = ‘-moz-inline-block’;//firefox
labelSpan .style.display = ‘-moz-inline-box’;//firefox
}
catch(ex){
//IE.. will use width only
}
labelSpan .style.width = ‘100px’;

labelText = document.createTextNode(‘Test’);
labelSpan .appendChild(labelText);

divObj.appendChild(labelSpan );

solution is :  used  “-moz-inline-box”  instead of “-moz-inline-block”

Advertisements

Categories