PDA

View Full Version : Sight Disability Access


stoneygossard
02-08-2007, 09:33 PM
Hi,

I have a site and want to add a function so that the user may view the text of the site at e.g. 100%,200% etc simply by pressing a link/button. Is this possible and if so how?I am fairly good with php and html but just trying to think of the most efficient way of doing this.

Stone

davidj
02-09-2007, 07:12 AM
using the language of your choice why not swap the CSS by ether making the text style dynamic or the entire CSS file

in PHP you could set the CSS using a $_SESSION

chriskq
02-09-2007, 10:16 AM
theres javascript font increasers decreasers.... if u set it up correctly the font can be retained throughout the site when the user is browsing pages (after alreadly clicking the font increase btn)

stoneygossard
02-09-2007, 06:04 PM
using the language of your choice why not swap the CSS by ether making the text style dynamic or the entire CSS file

in PHP you could set the CSS using a $_SESSION

Can you tell me more about using the CSS to make the text style dynamic?

Stone

d a v e
02-09-2007, 06:12 PM
css method http://www.alistapart.com/articles/alternate

davidj
02-09-2007, 06:18 PM
just create a few text styles in your CSS

.text1
.text2
.text3

then you can set a...

$_SESSION['textStyle']

then in an include you could have this...


switch($_GET['textSize']){

case '1': $_SESSION['textStyle']= 'text1'; break;

case '2': $_SESSION['textStyle']= 'text2'; break;

case '3': $_SESSION['textStyle']= 'text3'; break;

}


now you could use $_SESSION['textStyle'] to assign a class to a text block

You could also do this in Javascript using the DOM which is probably more economical