Home  |  Linux  | Mysql  | PHP  | XML
From:TG Date:Mon Feb  8 05:43:25 2010
Subject:Re: php selecting multiple stylesheets
You could use PHP and cookies (session variables are only useful until the
browser is closed, so it's not as persistant as it sounds like you may
want).

You could also have a system where users log in and they can save their
preferences on their user account settings.

What you may also look into is using Javascript (which can also set and
retrieve cookies) and with a good Javascript library like jQuery, it
should be relatively easy to dynamically switch style sheets.

Here's an example of a jQuery based stylesheet switcher:
http://www.kelvinluck.com/assets/jquery/styleswitch/toggle.html

Click the styles1, styles2 and styles3 links.


Also, there are JS scripts for adjusting font size, so you may not need a
completely different stylesheet. But it would mean having well designed
HTML that will scale nicely with the font change. Or you could just
have a different stylesheet, as you mentioned, so you know it will look
exactly how you want. You can see an example of a font size JS here:
http://www.joomla-beez.com/

Keep clicking the links in the upper right and you can continue to increase
or decrease the size quite a bit, not just one step.


I know this is a PHP list but I think a client side script may work better
in this case.

-TG

----- Original Message -----
From: David Mehler <dave.mehler@gmail.com>
To: php-general@lists.php.net
Date: Sun, 7 Feb 2010 23:20:18 -0500
Subject: [PHP] php selecting multiple stylesheets

> Hello,
> I'm trying to set up a web site. This site has multiple stylesheets,
> one default stylesheet that should be used if the other is not chosen.
> The second is a high contrast stylesheet and can be selected by user's
> who need it. I'm also thinking of adding two more for smaller and
> larger font selections. My issue is I want the high contrast sheet to
> be used on all subsequent pages and on subsequent visits to the site
> by user's who have selected it. I thought of using php with this and
> cookies. I'm using php5 and would appreciate any suggestions, googling
> has shown some examples, but none are working.
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Navigate in group php.general at sever news.php.net
Previous Next


Your recent visits
Re: [PHP] simplexml - can it do what I need?
Re: php selecting multiple stylesheets
Re: [PHP] Dom PDF Problem
RE: [PHP] removing an array from a compound array
Dom PDF Problem



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants