Retrieving fontsize
I'm just trying to incorporate a dynamic font sizing function into an application. On this test, I would have say 4 lines of various CSS-styled lines. Two buttons would be present to decrease and increase the size... the function is below, but isn't working - I can't seem to retrieve the actual font-size:
Anybody know why this is??
var tags = new Array( 'div','td','tr','p','b','table','a');
var fa;
function fontSize(amt) {
if (!document.getElementById)
return;
getBody = document.getElementsByTagName('body')[0];
for (i = 0 ; i < tags.length ; i++ ) {
getallTags = getBody.getElementsByTagName(tags[i]);
for (k = 0 ; k < getallTags.length ; k++) {
fa=getallTags[k].style.fontSize;
fa+=amt;
getallTags[k].style.fontSize=fa+"px"; }
}
}

