browse by category or date

After frustated unable to get my source codes displayed smaller, I decided to play around with CSS’ font-size for our amusement.

Testing Font
Possible value:
.. any font installed on your system
Possible values:
pixel, example: 10px 8px
point, example: 8pt
old-school HTML, example: 1 2 3 … 8
ems, example: 0.8em 1em

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)
   { = objSourceSize.value; = objSourceFont.value;



W3C Standard
W3School Tutorial
GD Star Rating

About Hardono

Hi, 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.

No Comment

Add Your Comment