Thursday, 15 September 2011

javascript - verticalAlign sub/sup not Working -



javascript - verticalAlign sub/sup not Working -

i have 2 buttons, 1 sets verticalalign property sub , 1 sets in sub however, both set sub. below code both:

superscript

document.getelementbyid("hidden").innerhtml=document.getelementbyid("text").value; document.getelementbyid("hidden").style.verticalalign="super"; document.getelementbyid("hidden").style.fontsize="75%";

subscript

document.getelementbyid("hidden").innerhtml=document.getelementbyid("text").value; document.getelementbyid("hidden").style.verticalalign="sub"; document.getelementbyid("hidden").style.fontsize="75%";

have controlled css in developer tool of browser? styles shown there?

otherwise recommended method:

document.getelementbyid("hidden").css("vertical-align","super"); document.getelementbyid("hidden").css("font-size","75%);

and

document.getelementbyid("hidden").css("vertical-align","sub"); document.getelementbyid("hidden").css("font-size","75%);

javascript css

No comments:

Post a Comment