Font Smaller or Bigger
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
- Serial
- Joomla! Enthusiast
- Posts: 156
- Joined: Sun Aug 28, 2005 7:03 pm
- Location: Montréal, Canada
Font Smaller or Bigger
Hey,
I was just reading some stuff on joomla.org and I stumbled on a cool feature of the template, the [ A+] [ A-] and [Reset] Buttons, does anyone know how to do that? If so can you be kind enough to enlighten me?
Thx, Serial
I was just reading some stuff on joomla.org and I stumbled on a cool feature of the template, the [ A+] [ A-] and [Reset] Buttons, does anyone know how to do that? If so can you be kind enough to enlighten me?
Thx, Serial
"The trick to creativity is knowing how to hide your sources..." Albert Einstein
- rg
- Joomla! Explorer
- Posts: 351
- Joined: Wed Aug 24, 2005 5:48 pm
- Location: Berlin
- Contact:
Re: Font Smaller or Bigger
They use JavaScript functions for this feature:
A+
A-
Reset
In fact on joomla.org images are used for the "buttons".
A+
A-
Reset
In fact on joomla.org images are used for the "buttons".
- Serial
- Joomla! Enthusiast
- Posts: 156
- Joined: Sun Aug 28, 2005 7:03 pm
- Location: Montréal, Canada
Re: Font Smaller or Bigger
Thx
"The trick to creativity is knowing how to hide your sources..." Albert Einstein
-
- Joomla! Intern
- Posts: 67
- Joined: Thu Aug 18, 2005 9:33 am
- Location: Netherlands
Re: Font Smaller or Bigger
And how can we use buttons within this code? Just made above links the link of the buttons?rg wrote: They use JavaScript functions for this feature:
A+
A-
Reset
In fact on joomla.org images are used for the "buttons".
- leolam
- Joomla! Master
- Posts: 20652
- Joined: Mon Aug 29, 2005 10:17 am
- Location: Netherlands/ Germany/ S'pore/Bogor/ North America
- Contact:
Re: Font Smaller or Bigger
view page sourceJelte wrote:And how can we use buttons within this code? Just made above links the link of the buttons?rg wrote: They use JavaScript functions for this feature:
A+
A-
Reset
In fact on joomla.org images are used for the "buttons".
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -
- mambogfx
- Joomla! Intern
- Posts: 72
- Joined: Thu Aug 18, 2005 10:18 pm
Re: Font Smaller or Bigger
http://www.lingo4u.de/article/fontsize/ you can use PHP and Cookies too for this effect
-
- Joomla! Intern
- Posts: 67
- Joined: Thu Aug 18, 2005 9:33 am
- Location: Netherlands
Re: Font Smaller or Bigger
Found it:view page source
Code: Select all
<div id="css_buttons">
<a href="index.php" title="Increase size" onclick="changeFontSize(1);return false;"><img src="http://forum.joomla.org/Themes/joomla/images/jos_css_larger.png" border="0" alt="larger" /></a><a href="index.php" title="Decrease size" onclick="changeFontSize(-1);return false;"><img src="http://forum.joomla.org/Themes/joomla/images/jos_css_smaller.png" border="0" alt="smaller" /></a><a href="index.php" title="Revert styles to default" onclick="revertStyles(); return false;"><img src="http://forum.joomla.org/Themes/joomla/images/jos_css_reset.png" border="0" alt="reset" /></a>
</div>
-
- Joomla! Intern
- Posts: 67
- Joined: Thu Aug 18, 2005 9:33 am
- Location: Netherlands
Re: Font Smaller or Bigger
I've added the code to my website but nothing happends... I think I need to put some javascript code in the heading of my page... don't I?
If so, what code should be inserted there?
If so, what code should be inserted there?
-
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Sep 20, 2005 11:57 pm
Re: Font Smaller or Bigger
I'm trying to get this to work too...
I've deciphered some of it in the usual longhand way but it's still not working for me either.
Can anyone work out why it's not functioning as expected?
I think it's to do with the javascript file reference to cookies and/or something overriding the system setting for the default font size!?
My trail goes like this...
After adding the HTML code to your page template
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****__
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****___
You change all those references to where you have put the button artwork in your templates folder.
Then you need to add the CSS buttons item for the buttons to your CSS file
eg. see the CSS for this page
http://forum.joomla.org/Themes/joomla/c ... te_css.css
***** Manual signatures are NOT allowed *****_____
/** css buttons **/
#css_buttons {
width: auto;
white-space: nowrap;
float: right;
margin-top: 85px;
margin-right: 20px;
}
#css_buttons a {
margin-right: 1px;
}
***** Manual signatures are NOT allowed *****_____
Then drop the javascript file into your template folder or wherever you want it and reference it in the html page header of wherever the javascript lives.
eg. see for this page
ie. pull that url up in your browser and save it as a text file.
and add the line above reference into your HTML
And then drop the buttons artwork into the right place.
Then it should work - but it doesn't.
Any help would be appreciated as this is a really useful feature.
I've deciphered some of it in the usual longhand way but it's still not working for me either.
Can anyone work out why it's not functioning as expected?
I think it's to do with the javascript file reference to cookies and/or something overriding the system setting for the default font size!?
My trail goes like this...
After adding the HTML code to your page template
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****__
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****___
You change all those references to where you have put the button artwork in your templates folder.
Then you need to add the CSS buttons item for the buttons to your CSS file
eg. see the CSS for this page
http://forum.joomla.org/Themes/joomla/c ... te_css.css
***** Manual signatures are NOT allowed *****_____
/** css buttons **/
#css_buttons {
width: auto;
white-space: nowrap;
float: right;
margin-top: 85px;
margin-right: 20px;
}
#css_buttons a {
margin-right: 1px;
}
***** Manual signatures are NOT allowed *****_____
Then drop the javascript file into your template folder or wherever you want it and reference it in the html page header of wherever the javascript lives.
eg. see for this page
ie. pull that url up in your browser and save it as a text file.
and add the line above reference into your HTML
And then drop the buttons artwork into the right place.
Then it should work - but it doesn't.
Any help would be appreciated as this is a really useful feature.
- TheSaint
- Joomla! Ace
- Posts: 1256
- Joined: Sat Aug 20, 2005 4:15 am
- Location: California, USA
- Contact:
Re: Font Smaller or Bigger
mambogfx, if you used php wouldn't it have to parse the script with a new page load for each time you changed the font size? Correct me if I'm wrong, but wouldn't that be a bit more resource intensive?
█ Paul
█ http://www.gamehostingreviews.com - In development
█ The only thing necessary for the triumph of evil is for good men to do nothing. - Edmund Burke
█ http://www.gamehostingreviews.com - In development
█ The only thing necessary for the triumph of evil is for good men to do nothing. - Edmund Burke
- netshine
- Joomla! Explorer
- Posts: 430
- Joined: Thu Aug 18, 2005 9:19 am
- Location: Peterborough, UK
- Contact:
Re: Font Smaller or Bigger
I've been struggling with this for the last hour. Very frustrating but I finally figured out what was going wrong (for me, at least): You need to set the font-size on the BODY element in the CSS file to say 80%, then make sure that all other font-size specifications in your CSS file are set to em sizes rather than px or pt. Then make sure that your index.php file has the doctype declaration right at the very top - before the xml declaration. That is the only way to get IE out of quirks mode - it ignores doctypes if anything else comes beforehand.Then it should work - but it doesn't.
Any help would be appreciated as this is a really useful feature.
Hope this helps!
-
- Joomla! Ace
- Posts: 1384
- Joined: Thu Aug 18, 2005 10:11 pm
- Location: San Juan - Argentina
- Contact:
Re: Font Smaller or Bigger
Hi guys
I've been trying to make this feature work, but had no luck...
Could any1 implement this in a template ?
It'd be nice that the guy who made the joomla.org's template to give us some tips to acchieve this...
I've been trying to make this feature work, but had no luck...
Could any1 implement this in a template ?
It'd be nice that the guy who made the joomla.org's template to give us some tips to acchieve this...
- netshine
- Joomla! Explorer
- Posts: 430
- Joined: Thu Aug 18, 2005 9:19 am
- Location: Peterborough, UK
- Contact:
Re: Font Smaller or Bigger
The Globalbiz template on Jamobworks has this feature:
http://www.jamboworks.com/Products/Temp ... _Template/
You have to be a member to get it though...
...alternatively, just go to joomla.org, click File->Save As, save it to your desktop, then take a look at the css and js files.
http://www.jamboworks.com/Products/Temp ... _Template/
You have to be a member to get it though...
...alternatively, just go to joomla.org, click File->Save As, save it to your desktop, then take a look at the css and js files.
- mambogfx
- Joomla! Intern
- Posts: 72
- Joined: Thu Aug 18, 2005 10:18 pm
Re: Font Smaller or Bigger
Yes but where is the Problem? It´s save in a Cookie and your Guest get the same fontsize when he come backTheSaint wrote: mambogfx, if you used php wouldn't it have to parse the script with a new page load for each time you changed the font size? Correct me if I'm wrong, but wouldn't that be a bit more resource intensive?
-
- Joomla! Ace
- Posts: 1384
- Joined: Thu Aug 18, 2005 10:11 pm
- Location: San Juan - Argentina
- Contact:
Re: Font Smaller or Bigger
OMG... what a pitty it is commercial stuff...netshine wrote: The Globalbiz template on Jamobworks has this feature:
http://www.jamboworks.com/Products/Temp ... _Template/
You have to be a member to get it though...
...alternatively, just go to joomla.org, click File->Save As, save it to your desktop, then take a look at the css and js files.
- netshine
- Joomla! Explorer
- Posts: 430
- Joined: Thu Aug 18, 2005 9:19 am
- Location: Peterborough, UK
- Contact:
Re: Font Smaller or Bigger
I have e-mailed Jamboworks to ask them if they would mind making that particular javascript file open source. If I get the go-ahead from them, I will release an open source template with this text-resizing feature in it and I'll update this thread to let you know.
- kaizen
- Joomla! Explorer
- Posts: 294
- Joined: Fri Aug 26, 2005 5:05 am
- Location: Pennsylvania, USA
- Contact:
Re: Font Smaller or Bigger
Robert Anthony Pitera
West of East, Inc. - http://www.westofeast.com - Taking technology in new directions™
West of East, Inc. - http://www.westofeast.com - Taking technology in new directions™
- bostanio
- Joomla! Enthusiast
- Posts: 145
- Joined: Fri Sep 16, 2005 6:32 pm
- Location: San Francisco
Re: Font Smaller or Bigger
I just got around to adding the "style changer" to my template. It works great. Initially I was confused by the fact that you have to switch to % or em sizes to have the fonts change but this actually turns out to be a feature. It means that if you don't want a font to be adjusted by the javascript you can specify it's height using pt's or px's. I find this usefull for various non-content header, footer and navigation elements which I want to remain fixed sizes. Then set the main content CSS to say 80% (the actual amount is irrelevant as it is overridden by the javascript anyway) and only the main content elements will be resized.
Jon Palmer
- kaizen
- Joomla! Explorer
- Posts: 294
- Joined: Fri Aug 26, 2005 5:05 am
- Location: Pennsylvania, USA
- Contact:
Re: Font Smaller or Bigger
Also using ems and %, the user can change the font size in the browser. As I'm learning more about this I am changing things to become more standardized.
Robert Anthony Pitera
West of East, Inc. - http://www.westofeast.com - Taking technology in new directions™
West of East, Inc. - http://www.westofeast.com - Taking technology in new directions™
-
- Joomla! Ace
- Posts: 1384
- Joined: Thu Aug 18, 2005 10:11 pm
- Location: San Juan - Argentina
- Contact:
Re: Font Smaller or Bigger
great news ! hope they make this stuff free soon !netshine wrote: I have e-mailed Jamboworks to ask them if they would mind making that particular javascript file open source. If I get the go-ahead from them, I will release an open source template with this text-resizing feature in it and I'll update this thread to let you know.
- netshine
- Joomla! Explorer
- Posts: 430
- Joined: Thu Aug 18, 2005 9:19 am
- Location: Peterborough, UK
- Contact:
Re: Font Smaller or Bigger
Ok, I got permission to use the script so I have added it to 2 different templates, both of which are available here:
http://www.netshinesoftware.com/mambo-development.html
'Netshine Basic' is a very lightweight table-less CSS fixed-width template. Due to its minimalist nature, it should be quite easy to see how it all works - there is no unnecessary code getting in the way. This template can also be used as a basis for building a more complex one.
'XPLike.Plesk.Blue.2' is a much more complicated template - a conversion from the SWSoft release for Mambo 4.5.0. It is the template my own site uses, so I have added the accessibility features to that too.
http://www.netshinesoftware.com/mambo-development.html
'Netshine Basic' is a very lightweight table-less CSS fixed-width template. Due to its minimalist nature, it should be quite easy to see how it all works - there is no unnecessary code getting in the way. This template can also be used as a basis for building a more complex one.
'XPLike.Plesk.Blue.2' is a much more complicated template - a conversion from the SWSoft release for Mambo 4.5.0. It is the template my own site uses, so I have added the accessibility features to that too.
-
- Joomla! Ace
- Posts: 1384
- Joined: Thu Aug 18, 2005 10:11 pm
- Location: San Juan - Argentina
- Contact:
Re: Font Smaller or Bigger
thanks netshine !
I didn't notice this reply you made in the thread...
Gonna try the templates... thanks 4 your help !
I didn't notice this reply you made in the thread...
Gonna try the templates... thanks 4 your help !
- Dead Parrot
- Joomla! Enthusiast
- Posts: 237
- Joined: Fri Sep 02, 2005 3:14 pm
- Location: England
Re: Font Smaller or Bigger
You are a genius!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!netshine wrote:I've been struggling with this for the last hour. Very frustrating but I finally figured out what was going wrong (for me, at least): You need to set the font-size on the BODY element in the CSS file to say 80%, then make sure that all other font-size specifications in your CSS file are set to em sizes rather than px or pt. Then make sure that your index.php file has the doctype declaration right at the very top - before the xml declaration. That is the only way to get IE out of quirks mode - it ignores doctypes if anything else comes beforehand.Then it should work - but it doesn't.
Any help would be appreciated as this is a really useful feature.
Hope this helps!
I have spent hours and hours trying to figure out why the hell the style changer would not work with IE. Man I could cry about how much time I have wasted when the solution was right here. I searched and looked through the other threads about this font resizer but nothing came up only just managed to stumble upon this one, why it didnt come up in my other searches I dont know.
- netshine
- Joomla! Explorer
- Posts: 430
- Joined: Thu Aug 18, 2005 9:19 am
- Location: Peterborough, UK
- Contact:
Re: Font Smaller or Bigger
Glad to be of service!
- marcos
- Joomla! Apprentice
- Posts: 35
- Joined: Mon Aug 29, 2005 8:59 am
- Location: Iowa
Re: Font Smaller or Bigger
Thank you netshine!!!netshine wrote: Ok, I got permission to use the script so I have added it to 2 different templates, both of which are available here:
http://www.netshinesoftware.com/mambo-development.html
[...]
your "basic" one serves me as a tutorial (and as a "template to create a template")
one thing I noticed in the basic: you have some images pointing to /templates/xplike.plesk.blue.2/images
I did not notice that until I started working on the basic template, because I downloaded and installed both
also... I noticed that you have a footer that states:
Joomla! "Basic" Template by Netshine Software Limited with the link to Netshine.
Do you want us to keep that as is, or only to make some reference to your work?... For the site I'm working with, I would like to use something like:
Design by Marcos using a template provided by by Netshine Software Limited
furthermore, I do have another client that do not want anything on the webpage besides their own webmaster... I could leave a message in the source, but I don't know if that's agreable with you.
Thanks!!!
Marcos
- netshine
- Joomla! Explorer
- Posts: 430
- Joined: Thu Aug 18, 2005 9:19 am
- Location: Peterborough, UK
- Contact:
Re: Font Smaller or Bigger
Oops - must've copied and pasted something from the xplike.plesk template
You can do what you like with the copyright message - remove it entirely if you wish. Of course, credits and links back to netshinesoftware.com are always welcome!
You can do what you like with the copyright message - remove it entirely if you wish. Of course, credits and links back to netshinesoftware.com are always welcome!