![]() |
|
|
+ Search |
![]()
|
Apr 7th, 2008 22:54
ha mo, Klaus Bolwin, Nakita Jones,
first of all, all dimensions and positions for the HTML-elements must be
given in relative values (%). To scale the text, use the following
function, which can be called by an onload event in the body tag.
Assuming a font size of 14pt in a window of 1152px width:
function setfont()
{
iBreite = (document.all) ?
document.documentElement.offsetWidth:window.innerWidth;
document.body.style.fontSize = iBreite/1143*14+"pt";
}
Now you can determine diverent font-sizes (for nested HTML-elements in
relative values (%), which are related to the bodies font size.
div {font-size:150%;}
or
span {font-size:1.5em;}
are leading to a font size, of 1.5 times that of the body.
However you should use % to avoid problems with MSIE.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com