Sunday, August 14, 2011

Javascript basic functionalities

document.getElementById("divId").style.margin='20px 20px 20px 20px';
document.getElementById("divId").style.marginTop='-2px';
document.getElementById("divId").style.marginBottom='-2px';
document.getElementById("divId").style.marginLeft='-2px';
document.getElementById("divId").style.marginRight='-2px';

document.getElementById("divId").style.padding='20px 20px 20px 20px';
document.getElementById("divId").style.paddingBottom='1px';
document.getElementById("divId").style.paddingTop='1px';
document.getElementById("divId").style.paddingLeft='1px';
document.getElementById("divId").style.paddingRight='1px';


document.getElementById("divId").style.height='146px';
document.getElementById("divId").style.width='146px';


document.getElementById("divId").style.position='relative';

document.getElementById("divId").style.display = 'NONE';
document.getElementById("divId").style.display = 'BLOCK';

document.getElementById("divId").style.visibility="visible";

document.getElementById("divId").style.backgroundColor="#CDDBF0";

No comments:

Post a Comment

Please comment on this