Joomla Beez_20 template: Fontsize – Limit Size Increases

When you use joomla and use the Beez templates you have a module which allows you to set the Font size to Bigger…Smaller or reset. I implement this feature into some of my own templates and websites and need to limit the max font size depending on the design.

In some cases the font becomes to bif for the design so you need to limit the max font size.

Find the following file within the Beez template: md_stylechanger.js

Look for the following code snippet:
function changeFontSize(sizeDifference) {
currentFontSize = parseInt(currentFontSize, 10) + parseInt(sizeDifference * 5, 10);
if (currentFontSize > 180) {
currentFontSize = 180;
} else if (currentFontSize < 60) {
currentFontSize = 60;
}
setFontSize(currentFontSize);
}

Change both the values to a lower number like 160. You are now setting the max size.

If you wanted to limit users to the smallest size then edit the two values below:

} else if (currentFontSize < 60) {
currentFontSize = 60;

I hope this helps!

Share
This entry was posted in Joomla and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free