Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   HOWTO: let the viewer change the text size (http://forum.bytesforall.com/showthread.php?t=5648)

juggledad Feb 1, 2010 12:50 PM

HOWTO: let the viewer change the text size
 
Thanks to Andante - I stole this from her site

Here is a nifty little thing you can do to to allow your viewser change the size of the text on the fly.
Create a text widget and set the title as 'Change Text Size'. In the text area of the widget add
HTML Code:

<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='.8em'"><span style="font-size: xx-small;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1em'"><span style="font-size: x-small;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1.2em'"><span style="font-size: small;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1.4em'"><span style="font-size: large;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1.6em'"><span style="font-size: x-large;">+</span></a>

You will now have a series of plus signs that the viewer can click to increase/decrease the text size

Tim F Apr 2, 2010 07:22 AM

Great post. I have just used this to allow toggling the background colour of my photo blog, by changing 'fontsize' in the code to 'background'

aravere Oct 19, 2010 02:06 PM

This is great and easy to implement. What would it take to have only the text in the body of pages and posts be affected (as oppposed to the entire page)?

Not sure if this for another thread, but is there a way to change the fonts of the Category' font size, as well as other things like the body text, titles, etc.?

Thanks!

Janine Jan 7, 2011 06:53 AM

Hi Juggledad,
Your code works fine. But only with TEXT. The website background remains constant. This destroys the homogenous look to the website -- and can be confusing. I had to remove the text in the top decorative bar. (since updating the WP to 3.0 the font resizer doesn't work there anymore, but I left it in -- in the hope of a solution).

Is it possible to have code that enlarges the whole screen image? Not just the Font-size?

Thanks!
Janine

quintain Jul 4, 2011 03:47 PM

Quote:

Originally Posted by juggledad (Post 24454)
Thanks to Andante - I stole this from her site

Here is a nifty little thing you can do to to allow your viewser change the size of the text on the fly.
Create a text widget and set the title as 'Change Text Size'. In the text area of the widget add
HTML Code:

<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='.8em'"><span style="font-size: xx-small;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1em'"><span style="font-size: x-small;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1.2em'"><span style="font-size: small;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1.4em'"><span style="font-size: large;">+</span></a>
<a href="javascript:void(0);" onclick="javascript:body.style.fontSize='1.6em'"><span style="font-size: x-large;">+</span></a>

You will now have a series of plus signs that the viewer can click to increase/decrease the text size

Hi Juggledad
ATA 3.5.3 WP 3.1.3. The above code used in a Text Widget increases the text in my body content and Title plus strap line but not in the sidebars.
In ATA 3.6.7 WP 3.1.3 it increases the size in the sidebars plus Title and strap line but not the body content.

Do you have any magic!!! solution to the 3.6.7 theme.

juggledad Jul 5, 2011 08:43 AM

odd, I just tested it and in both 353 and 367 it effects the sidebars. can you show me your site for 353 where it doesn't effect the sidebars?

quintain Jul 5, 2011 09:53 AM

Hi Juggledad
Sent sites to you privately.

juggledad Jul 5, 2011 10:03 AM

Do you have all BUGFIX's for 367 applied? (they can be found in the 'New Version & Updates' forum and sub forum)
--if not, apply them before we go any further and re-test

quintain Jul 5, 2011 02:41 PM

I have not updated but have now started to do so.

Some bugfixes are described as "replacing other bugfixes"

Is there a list of "bugfixes" which at this date should be used or should I just start at No 1 and work onwards ??

juggledad Jul 5, 2011 04:18 PM

there are currently 5 and #4 contains #2. #5 is really only needed if you use 'WordPress SEO by Yoest', so if you are not using that plugin, you should apply 1, 3 and 4.

You know, since all modern browsers have a way built in to make the type bigger, maybe you should just tell people to use the browser ZOOM function.

quintain Jul 5, 2011 04:41 PM

Hi Juggledad
Thanks for your assistance it helps.
Regarding browser zoom I am coming to that opinion, but am presently playing around with "Accessibility" options and I am considering all ways of making things easier for those who are less able (is that the correct PC term).
So the bugfixes, I do use yoast.
I will use bugfix #1,3,4 & 5 BUT I see there are #8 & 9 and others.
I have already used bugfix #9, it was at this stage that I could see that #9 replaced #8 hence my question about which fixes to use.
Should I leave #9 as it now is and just use #1,3,4,5
My apologies if I am being slower than normal in this matter.

juggledad Jul 5, 2011 07:10 PM

If you are on 367 you only want to apply the ones that start with 'BUGFIX 367-nn....'

SharonJ Jul 27, 2011 04:01 PM

Quote:

Originally Posted by juggledad (Post 69144)
odd, I just tested it and in both 353 and 367 it effects the sidebars. can you show me your site for 353 where it doesn't effect the sidebars?

It does not change the sidebars on mine either, not that I care. I have not updated to 367 and will await the next version and avoid having to bug fix.

Thank you very very much for the Text sizer, I like having accessibility options for the visually impaired.

juggledad Jul 27, 2011 04:35 PM

Quote:

I have not updated to 367 and will await the next version and avoid having to bug fix
if you never upgrade a piece of software because there might be a bug in it, you should give up now and go back to pencil and paper. Seriously, I am willing to bet that there will be bugs in the next version and the one after that and the one after that...

What you want to see if if they get fixed and that's what the patches are for.

SharonJ Jul 27, 2011 04:45 PM

Quote:

Originally Posted by juggledad (Post 69974)
if you never upgrade a piece of software because there might be a bug in it, you should give up now and go back to pencil and paper. Seriously, I am willing to bet that there will be bugs in the next version and the one after that and the one after that...

What you want to see if if they get fixed and that's what the patches are for.

OK OK OK, you have convinced me! :) I will do it asap


All times are GMT -6. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.