-->

How to Make Text Resize on Blogger



Text resize is a button that works to enlarge and reduce the letters in your blog article. This text resize button is usually in the form of 'A +' to zoom in and 'A-' to zoom out. However, it could be different signs on each website or blog.

Text resize is very useful for the convenience of blog visitors, because it can adjust the size of the letters to their needs or adjusted to the width of the screen.

How to make text resize is also very easy, you only need to listen to the method I will explain below and calm, its size is only small and in the form of a combination of CSS and JavaScript so that it does not burden blog loading.

How to Make Text Resize on Blogger


1. Open your Blogger dashboard.
2. Select the Themes menu > Edit HTML .
3. Paste the following code above </style> or ]]> </ b: skin> . If the resize text display is not interesting, you can change it through this CSS code.

.rfopit {margin-top: 10px; text-align: right}
#large {font-size: 20px}
#reset {font-size: 18px}
#small {font-size: 16px}

4. And don't forget to paste the following code above < /head >.


<script type = 'text / javascript'>
$ (function () {
$ (& # 39; input & # 39;). Click (function () {
var ourText = $ (& # 39;. post-body & # 39;);
var currFontSize = ourText.css (& # 39; fontSize & # 39;);
var finalNum = parseFloat (currFontSize, 10);
var stringEnding = currFontSize.slice (-2);
if (this.id == & # 39; large & # 39;) {
finalNum * = 1.1;
}
else if (this.id == & # 39; small & # 39;) {
finalNum /=1.1;
}
else if (this.id == & # 39; reset & # 39;) {
finalNum = 16;
}
ourText.animate ({fontSize: finalNum + stringEnding}, 500);
});
});
</script>

5. Finally, paste the following code where you want the button to be.


<div class = 'rfopit'>
<input id = 'large' title = 'Zoom in' type = 'button' value = 'A +' />
<input id = 'reset' title = 'Normal' type = 'button' value = 'A' />
<input id = 'small' title = 'Zoom out' type = 'button' value = 'A -' />
</div>

6. Done.

author

Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

Post a comment