Mar 1, 2009

Automatic Change Font Widget

There's an easy way to change font type and size on main post. You can try here . When you change font option, main post font will change automatically.

How to?
  1. Go to layout > Page Element
  2. Add HTML widget on your sidebar element
  3. Paste this HTML code and save

<center>
<script>
function go1(){
if (document.selecter2.select2.options
[document.selecter2.select2.selectedIndex].value != "none") {
document.getElementById('main').style.fontSize
=document.selecter2.select2.options
[document.selecter2.select2.selectedIndex].value
}
}

function go2(){
if (document.selecter2.select3.options
[document.selecter2.select3.selectedIndex].value != "none") {
document.getElementById('main').style.fontFamily
=document.selecter2.select3.options
[document.selecter2.select3.selectedIndex].value
}
}
</script>
<form id="forma" name="selecter2" method="POST">

<select onchange="go2()" style="font-family:verdana;font-size:8pt" name="select3" size="1">
<option value="Times New Roman"/>Times New Roman
<option value="Arial"/>Arial
<option selected value="Book Antiqua"/>Book Antiqua
<option value="Bookman Old Style"/>Bookman Old Style
<option value="Century Gothic"/>Century Gothic
<option value="Comic Sans Ms"/>Comic Sans Ms
<option value="Tahoma"/>Tahoma
<option selected value="Trebuchet Ms"//>Trebuchet Ms
<option value="Verdana"/>Verdana
</select>
<select onchange="go1()" style="font-family:verdana;font-size:8pt" name="select2" size="1">
<option value="8px"/>8
<option value="9px"/>9
<option value="10px"/>10
<option value="11px"/>11
<option selected value="12px"/>12
<option value="14px"/>14
<option value="16px"/>16
<option value="18px"/>18
</select>
</form>
</center>


It's work? No? You should check your template code. Maybe there's any specific setting on post, example

.post {
margin:.5em 0 1.5em;
border-bottom:1px dotted #cccccc;
padding-bottom:1.5em;
font-type:arial, verdana;
font-size:12px;
}
Remove it.

You can add font type as many as you want, just edit the code. Translate for you from here

12 comments:

  1. opo iki bong.....??
    kenek dipasang nang minipost ta..??

    wekekeke.....:) ga usah dipikir yo ga popo...
    cuan ingin melintas aja...

    :) :)

    ReplyDelete
  2. thats cool widget...

    ReplyDelete
  3. Great blog with nice pictures.

    For more info on soccer, pls visit http://aptconnections.blogspot.com/

    For more info on inspirational fathers, pls visit http://inspirationalfathers.blogspot.com/

    For more links on technology, pls visit www.yasthirah.com

    HAPPY BLOGGING!

    ReplyDelete
  4. thanks a lot. those codes actually work. planning to use it in my blog :)

    ReplyDelete
  5. oke sip juga www.alidcorner.blogspot.com

    ReplyDelete
  6. Hi,

    Thanks for the code. The only change I made was to remove the center tag- didn't need it. But it looks like it will work just fine. Hope my readers- we have a lot of older readers and people with visual limitations who read our blog.

    ReplyDelete
  7. Thank infonya.btw,how make this change font place under posting.not the widget.Just only under posting.thank's.

    ReplyDelete
  8. www.tikaajahcukup.blogspot.com says thank u for this article....

    ReplyDelete
  9. One accessory that many pandora beads women consider a necessity is a handbag. In fact there is such a demand for pandora bracelet ladies handbags in the marketplace that the selection just constantly pandora bracelets ebay increases. As each new season begins there are pandora bracelets uk dozens of new designs of ladies handbags available. pandora charm bracelet Every woman has her own sense of style and therefore she’ll tend to purchase ladies pandora charms handbags that reflect that. For some women they only buy designer ladies handbags. pandora charms bracelets These particular types of ladies handbags are crafted from the finest materials and pandora jewellery carry the names of some of the most celebrated designers in the world. Designer pandora jewelry ladies handbags are very expensive but many women view them as a fashion pandora uk investment.

    ReplyDelete
  10. I like this news, thank you for sharing out the resources, I also have information sharing, this is my share content pandora

    ReplyDelete
  11. Coach outlet online Leading American designer and maker of luxury lifestyle handbags and accessories.Large market in Europe and Canada,UK,USA etc.Welcome to Order!2011 New Style arrive,Free Shipping!

    ReplyDelete

Hi, thanks for visiting. You can leave your comment here

 

Ipietoon - Blog Design and Online Business Blogging Since 2008