I am working with two buttons that manipulate the verticalAlign
property. One button is supposed to set it to sub
and the other is supposed to set it to sub
. However, both buttons end up setting it to sub
.
Here is the code for both actions:
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%";