How to give the option to increase font size on all pages of the website as displayed below.
Text size: A | A | A
Thus choosing the relative font size
How to give the option to increase font size on all pages of the website as displayed below.
Text size: A | A | A
Thus choosing the relative font size
Let them know about Ctrl+Minus and Ctrl+Plus
If you want to script things though, you can set the body font-size as a percentage, then use em’s or percentages throughout the stylesheet so that they will update themself automatically when the body font-size changes.
As pmw57 said, looks like what you are looking for is scripting. You can try your luck with javascript, this should not be something done with php.
hey i found a perfect solution
chk it out!
in the header
<script language=“JavaScript” type=“text/javascript”>
function changeFontSize(inc)
{
var p = document.getElementsByTagName(‘p’);
for(n=0; n<p.length; n++) {
if(p[n].style.fontSize) {
var size = parseInt(p[n].style.fontSize.replace(“px”, “”));
} else {
var size = 12;
}
p[n].style.fontSize = size+inc + ‘px’;
}
}
</script>
and in body
<div>
<a href=“javascript:changeFontSize(-2)”><span style=“font-size:12px;color:#000”>A | </span></a>
<a href=“javascript:changeFontSize(2)”><span style=“font-size:15px;color:#000”>A </span></a>
</div>
Sure it’s perfect, except for the 10% of everyone who can’t use scripting or the function is blocked, in which you will have a dead link.
It’s a VERY bad practice to replicate or hijack browser functionality within the website. Educate your visitors don’t confuse them.