Well, I have this script that makes a line span the screen size. You can
ofcourse always do something like document.body.s tyle.fontSize=' 5cm';
This would make characters about 5 centimeters high.
<html>
<head>
<script language="JavaS cript">
<!--
function calibrate() {
obj = document.getEle mentById('sizet est');
grow(0, obj.offsetHeigh t);
}
function grow(size, rowHeight) {
size+=10;
document.body.s tyle.fontSize = size+'px';
window.setTimeo ut(
"growTest("+siz e+","+rowHeight +");",10);
}
function shrink(size, rowHeight) {
size-=1;
document.body.s tyle.fontSize = size+'px';
window.setTimeo ut(
"shrinkTest("+s ize+","+rowHeig ht+");",10);
}
function shrinkTest(size , rowHeight) {
obj = document.getEle mentById('sizet est');
if (obj.offsetHeig ht>(rowHeight/2)) {
shrink(size, obj.offsetHeigh t);
}
}
function growTest(size, rowHeight) {
obj = document.getEle mentById('sizet est');
if (obj.offsetHeig ht>(rowHeight*2 )) {
shrink(size, obj.offsetHeigh t);
} else {
grow(size, obj.offsetHeigh t);
}
}
<!-- -->
</script>
</head>
<body onLoad="calibra te();">
<SPAN id="sizetest">T his should span a whole line</SPAN>
</body>
</html>
Timo wrote:
All my font-sizes are set as relative sizes in CSS (large, medium, small,
x-small, etc). Let's say something is set in CSS to be xx-large, but a
visually impaired user wants it displayed even bigger. Can a script
determine an element's absolute size, *as it is being rendered by the
browser*, and then increment the element's font-size in absolute terms?
Thanks!
Timo