After frustated unable to get my source codes displayed smaller, I decided to play around with CSS’ font-size for our amusement.
Done using Javascript:
<script language="javascript"> function UpdateFont() { var objTarget = document.getElementById('divtarget'); // a div var objSourceFont = document.getElementById('txbFont'); // a textbox var objSourceSize = document.getElementById('txbSize'); // a textbox if (objTarget != null && objSourceFont != null && objSourceSize != null) { objTarget.style.fontSize = objSourceSize.value; objTarget.style.fontFamily = objSourceFont.value; } } </script>
- Resources:
- W3C Standard
W3School Tutorial
GD Star Rating
loading...
loading...
About Hardono
Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.
Incoming Search
javascript