From: Ashley Sheridan on
On Mon, 2010-02-08 at 11:18 +0100, Stephan Ebelt wrote:

> On Sun, Feb 07, 2010 at 11:20:18PM -0500, David Mehler wrote:
> > 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.
>
>
> in CSS there is also the concept of 'alternate stylesheets' build in. A page can
> basically specify as many stylesheets as it wants where one is default and all others are 'alternate'. The browser will then offer menu entries for the user to choose from. Ie in firefox you can choose the style from the menu at: View -> Page Style -> ...
>
> Here's how it works in detail: http://www.w3.org/Style/Examples/007/alternatives (note that this site also has alternate styles available)
>
> PHP could be used to define the default style sheet on a per user/application setting basis...
>
> stephan
>
>
>


The only problem relying only on this method is that not all browsers
are compatible with it, and of those that are, none remember the choice
a user makes from page to page, so they'd have to reselect it upon each
page visit

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: "Michael A. Peters" on
TG wrote:
> 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).

Persistent sessions are possible.

The way I'm doing it in the CMS I am working on is via GET which saves
selection in session.

I can't use a selector because I tailor the web page to the style sheet
and some of them require different page design (IE search bar in aside
opposed to header)

I don't use persistent sessions, but session is kept in cookie and you
can configure it to be a persistent cookie if you want.
From: Al on


On 2/7/2010 11:20 PM, David Mehler wrote:
> 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.

Dealing with style sheet caching by all the different browsers and the user's
settings for them is the big problem.

I'd suggest this: Use the sessions buffer for simplicity. And, link your
complete [all the selectors] default css file in the header.

Then, include ONLY the selectors needed to render the special selectors in the
html's header style block. These selectors will override those in the css file.

Now, simply modify the selectors here when you return the page. Far as I know,
all browsers honor revised styles when they are in the page html header.
<header> <style type="text/css">
<!--
special selectors go here
-->
</style>
</header>
From: tedd on
At 11:20 PM -0500 2/7/10, David Mehler wrote:
>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


Try this:

http://sperling.com/examples/styleswitch1/

As far as zooming text size, most browsers are capable of this. Just
make your site zoom-cooperative, such as:

http://sperling.com/examples/zoom/

As far as making things high contrast, why not choose colors that are
right the first time? Try this:

http://webbytedd.com/c/access-color/

As far as making all of this persistent, look to using Cookies.

Cheers,

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From: Ashley Sheridan on
On Mon, 2010-02-08 at 10:00 -0500, tedd wrote:

> At 11:20 PM -0500 2/7/10, David Mehler wrote:
> >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
>
>
> Try this:
>
> http://sperling.com/examples/styleswitch1/
>
> As far as zooming text size, most browsers are capable of this. Just
> make your site zoom-cooperative, such as:
>
> http://sperling.com/examples/zoom/
>
> As far as making things high contrast, why not choose colors that are
> right the first time? Try this:
>
> http://webbytedd.com/c/access-color/
>
> As far as making all of this persistent, look to using Cookies.
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>


There is a good reason for having different stylesheets that use
differing colour systems. For example, some people with learning
difficulties benefit from yellow text on blue backgrounds, as apparently
those colours together are better at capturing a users attention for
longer durations. This is often coupled with other layout changes such
as narrower width text blocks to aid readability.

Thanks,
Ash
http://www.ashleysheridan.co.uk