July 14, 2009

How To Add Text Resizer to Blogger






1.Log in to your dashboard--> layout- -> Edit HTML

2.Click on "Expand Widget Templates"

3.Scroll down to where you see this :


4.Add below code before  ]]></b:skin>  tag.

.textresize {

5.Now add below code between  ]]></b:skin>  and  </head>  tags.
<script language='JavaScript' type='text/javascript'>
function changeFontSize(inc)
var p = document.getElementsByTagName(&#39;p&#39;);
for(n=0; n&lt;p.length; n++) {
if(p[n].style.fontSize) {
var size = parseInt(p[n].style.fontSize.replace(&quot;px&quot;, &quot;&quot;));
} else {
var size = 12;
p[n].style.fontSize = size+inc + &#39;px&#39;;

6.Now again scroll down to where you see this :

<div class='post-header-line-1'/>

7.Add below code immediately after above line.

<span class='textresize'>
Text Size :<a href='javascript:changeFontSize(1)'> [+]</a> | <a href='javascript:changeFontSize(-1)'> [-]</a>

8.Now save your template and you are done.

Do you Like this Story..?

Get Free Email Updates Daily!

Follow us!

Do you Like This Story Widget For Blogger by Beautiful Blogger Widgets



Anonymous said...

Dear Author xpressblogging.blogspot.com !
Precisely, you are right

Blogging Now And Then © 2009 Med ELJAMALI