Re: [WSG] CSS off button

2010-02-07 Thread Jayachandran Kandasamy
Hi  Paul,

You can use select drop down box instead of buttons for the CSS switching -
this can minimize the space in page and usability will be effective for the
end users

On Thu, Feb 4, 2010 at 8:51 PM, Paul Novitski p...@juniperwebcraft.comwrote:

 At 2/4/2010 10:43 AM, Erickson, Kevin (DOE) wrote:

 Here is the page using your example: 
 http://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-from-wsg2.shtml
 
 http://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-from-wsg2.shtml



 I recommend that you give folks a corresponding button to turn styling back
 on after they switch it off.


 Paul
 __

 Paul Novitski
 Juniper Webcraft Ltd.
 http://juniperwebcraft.com


 ***
  List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: memberh...@webstandardsgroup.org
 ***




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***

RE: [WSG] CSS off button

2010-02-04 Thread Erickson, Kevin (DOE)
Thanks Jayachandran!
 
That definitely works but is there a way that it could keep the CSS off
when the visitor leaves the page? Using a cookie maybe?
Here is the page using your example:
http://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-fro
m-wsg2.shtml
 
Thank you,
Kevin



From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Jayachandran Kandasamy
Sent: Wednesday, January 27, 2010 2:25 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] CSS off button


Hi Kevin,
 
I have tried some sample code for switching off the CSS in jQuery.
 
Please go through this code below and let me know how far it is helping
you - if need anyother assistance please reply 
 
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTML
HEAD
TITLE New Document /TITLE
META NAME=Generator CONTENT=EditPlus
META NAME=Author CONTENT=
META NAME=Keywords CONTENT=
META NAME=Description CONTENT=
script src=http://code.jquery.com/jquery-latest.js;/script
http://code.jquery.com/jquery-latest.js%22%3E%3C/script 
link href=css/sample.css type=text/css rel=stylesheet/
style type=text/css
body {
 background-color: #acc;
 color: #fff;
 font-size: 25px;
}
/style
style type=text/css
.chumma {
 background-color: #ff9900;
 color: #123456;
 font-size: 30px;
 width: 500px;
 height: 500px;
}
/style
script type=text/javascript
 $(document).ready(function(){
  $(input.offButt).click(function() {
   if($(head:has(style))  $(head:has(link))){
$(head:has(style)).remove();
$(head:has(link)).remove();
   }
  });
 });
/script
/HEAD
BODY
Sample for CSS off
form name=sampleForm
input type=button value=Click to Off the CSS class=offButt
id=offButt /
div class=chummaHi Kevin/div
div class=nameWebsite group - Kevin/div
/form
/BODY
/HTML

Thanks,
JC

On Fri, Jan 22, 2010 at 12:22 PM, Erickson, Kevin (DOE)
kevin.erick...@doe.virginia.gov wrote:


Hello fellow WSG'ers.
 
Could anyone please tell me if there is a right way to put a
clickable button in a web page that will turn off all CSS?
 
Thanks,
Kevin


***
List Guidelines:
http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org

*** 



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*** 


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***


RE: [WSG] CSS off button

2010-02-04 Thread Erickson, Kevin (DOE)
Sorry. That question wasn't very clear. I meant when the visitor goes to
other pages on the site I would like the CSS to remain off using a
cookie. Do you have a way to do that?



From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Erickson, Kevin (DOE)
Sent: Thursday, February 04, 2010 1:44 PM
To: wsg@webstandardsgroup.org
Subject: RE: [WSG] CSS off button


Thanks Jayachandran!
 
That definitely works but is there a way that it could keep the CSS off
when the visitor leaves the page? Using a cookie maybe?
Here is the page using your example:
http://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-fro
m-wsg2.shtml
 
Thank you,
Kevin



From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Jayachandran Kandasamy
Sent: Wednesday, January 27, 2010 2:25 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] CSS off button


Hi Kevin,
 
I have tried some sample code for switching off the CSS in jQuery.
 
Please go through this code below and let me know how far it is helping
you - if need anyother assistance please reply 
 
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTML
HEAD
TITLE New Document /TITLE
META NAME=Generator CONTENT=EditPlus
META NAME=Author CONTENT=
META NAME=Keywords CONTENT=
META NAME=Description CONTENT=
script src=http://code.jquery.com/jquery-latest.js;/script
http://code.jquery.com/jquery-latest.js%22%3E%3C/script 
link href=css/sample.css type=text/css rel=stylesheet/
style type=text/css
body {
 background-color: #acc;
 color: #fff;
 font-size: 25px;
}
/style
style type=text/css
.chumma {
 background-color: #ff9900;
 color: #123456;
 font-size: 30px;
 width: 500px;
 height: 500px;
}
/style
script type=text/javascript
 $(document).ready(function(){
  $(input.offButt).click(function() {
   if($(head:has(style))  $(head:has(link))){
$(head:has(style)).remove();
$(head:has(link)).remove();
   }
  });
 });
/script
/HEAD
BODY
Sample for CSS off
form name=sampleForm
input type=button value=Click to Off the CSS class=offButt
id=offButt /
div class=chummaHi Kevin/div
div class=nameWebsite group - Kevin/div
/form
/BODY
/HTML

Thanks,
JC

On Fri, Jan 22, 2010 at 12:22 PM, Erickson, Kevin (DOE)
kevin.erick...@doe.virginia.gov wrote:


Hello fellow WSG'ers.
 
Could anyone please tell me if there is a right way to put a
clickable button in a web page that will turn off all CSS?
 
Thanks,
Kevin


***
List Guidelines:
http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org

*** 



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*** 
***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*** 


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***


Re: [WSG] CSS off button

2010-02-04 Thread Jayachandran Kandasamy
Hi Kevin,

I will let you know about the cookie technique soon :)

On Thu, Feb 4, 2010 at 10:43 AM, Erickson, Kevin (DOE) 
kevin.erick...@doe.virginia.gov wrote:

  Thanks Jayachandran!

 That definitely works but is there a way that it could keep the CSS off
 when the visitor leaves the page? Using a cookie maybe?
 Here is the page using your example:
 http://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-from-wsg2.shtml

 Thank you,
 Kevin

  --
 *From:* li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] *On
 Behalf Of *Jayachandran Kandasamy
 *Sent:* Wednesday, January 27, 2010 2:25 AM

 *To:* wsg@webstandardsgroup.org
 *Subject:* Re: [WSG] CSS off button

   Hi Kevin,

 I have tried some sample code for switching off the CSS in jQuery.

 Please go through this code below and let me know how far it is helping you
 - if need anyother assistance please reply

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
 HTML
 HEAD
 TITLE New Document /TITLE
 META NAME=Generator CONTENT=EditPlus
 META NAME=Author CONTENT=
 META NAME=Keywords CONTENT=
 META NAME=Description CONTENT=
 script 
 src=http://code.jquery.com/jquery-latest.js;/scripthttp://code.jquery.com/jquery-latest.js%22%3E%3C/script
 
 link href=css/sample.css type=text/css rel=stylesheet/
 style type=text/css
 body {
  background-color: #acc;
  color: #fff;
  font-size: 25px;
   }
 /style
 style type=text/css
 .chumma {
  background-color: #ff9900;
  color: #123456;
  font-size: 30px;
  width: 500px;
  height: 500px;
 }
 /style
 script type=text/javascript
  $(document).ready(function(){
   $(input.offButt).click(function() {
if($(head:has(style))  $(head:has(link))){
 $(head:has(style)).remove();
 $(head:has(link)).remove();
}
   });
  });
 /script
 /HEAD
  BODY
 Sample for CSS off
 form name=sampleForm
 input type=button value=Click to Off the CSS class=offButt
 id=offButt /
 div class=chummaHi Kevin/div
 div class=nameWebsite group - Kevin/div
 /form
 /BODY
 /HTML
 Thanks,
 JC
  On Fri, Jan 22, 2010 at 12:22 PM, Erickson, Kevin (DOE) 
 kevin.erick...@doe.virginia.gov wrote:

  Hello fellow WSG'ers.

 Could anyone please tell me if there is a right way to put a clickable
 button in a web page that will turn off all CSS?

 Thanks,
 Kevin

 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: memberh...@webstandardsgroup.org
 ***



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: memberh...@webstandardsgroup.org
 ***

 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: memberh...@webstandardsgroup.org
 ***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***

RE: [WSG] CSS off button

2010-02-04 Thread Paul Novitski

At 2/4/2010 10:43 AM, Erickson, Kevin (DOE) wrote:
Here is the page using your example: 
http://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-from-wsg2.shtmlhttp://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-from-wsg2.shtml



I recommend that you give folks a corresponding button to turn 
styling back on after they switch it off.


Paul
__

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] CSS off button

2010-01-27 Thread Oliver Boermans
On 27 January 2010 17:55, Jayachandran Kandasamy
jayachandran.kandas...@gmail.com wrote:
  $(document).ready(function(){
   $(input.offButt).click(function() {
    if($(head:has(style))  $(head:has(link))){
 $(head:has(style)).remove();
 $(head:has(link)).remove();
    }
   });
  });

I’m pretty sure this will remove the head element and everything in it.
Link elements are also used for more than just loading CSS so you
wouldn’t want to remove them without checking the type or rel
attribute too.

Regarding the JavaScript
http://api.jquery.com/
http://forum.jquery.com/

Cheers
Ollie


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] CSS off button

2010-01-27 Thread Jayachandran Kandasamy
Oliver,

This wont remove the head element but only the style and link tags .. but I
didnt do the attribute level, I will try it out man.. thanks for the
suggestion :)

Cheers
JC


On Wed, Jan 27, 2010 at 5:48 PM, Oliver Boermans boerm...@gmail.com wrote:

 On 27 January 2010 17:55, Jayachandran Kandasamy
 jayachandran.kandas...@gmail.com wrote:
   $(document).ready(function(){
$(input.offButt).click(function() {
 if($(head:has(style))  $(head:has(link))){
  $(head:has(style)).remove();
  $(head:has(link)).remove();
 }
});
   });

 I’m pretty sure this will remove the head element and everything in it.
 Link elements are also used for more than just loading CSS so you
 wouldn’t want to remove them without checking the type or rel
 attribute too.

 Regarding the JavaScript
 http://api.jquery.com/
 http://forum.jquery.com/

 Cheers
 Ollie


 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: memberh...@webstandardsgroup.org
 ***




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***


Re: [WSG] CSS off button

2010-01-26 Thread Jayachandran Kandasamy
Hi Kevin,

I have tried some sample code for switching off the CSS in jQuery.

Please go through this code below and let me know how far it is helping you
- if need anyother assistance please reply

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTML
HEAD
TITLE New Document /TITLE
META NAME=Generator CONTENT=EditPlus
META NAME=Author CONTENT=
META NAME=Keywords CONTENT=
META NAME=Description CONTENT=
script 
src=http://code.jquery.com/jquery-latest.js;/scripthttp://code.jquery.com/jquery-latest.js%22%3E%3C/script

link href=css/sample.css type=text/css rel=stylesheet/
style type=text/css
body {
 background-color: #acc;
 color: #fff;
 font-size: 25px;
}
/style
style type=text/css
.chumma {
 background-color: #ff9900;
 color: #123456;
 font-size: 30px;
 width: 500px;
 height: 500px;
}
/style
script type=text/javascript
 $(document).ready(function(){
  $(input.offButt).click(function() {
   if($(head:has(style))  $(head:has(link))){
$(head:has(style)).remove();
$(head:has(link)).remove();
   }
  });
 });
/script
/HEAD
BODY
Sample for CSS off
form name=sampleForm
input type=button value=Click to Off the CSS class=offButt
id=offButt /
div class=chummaHi Kevin/div
div class=nameWebsite group - Kevin/div
/form
/BODY
/HTML
Thanks,
JC
On Fri, Jan 22, 2010 at 12:22 PM, Erickson, Kevin (DOE) 
kevin.erick...@doe.virginia.gov wrote:

  Hello fellow WSG'ers.

 Could anyone please tell me if there is a right way to put a clickable
 button in a web page that will turn off all CSS?

 Thanks,
 Kevin

 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: memberh...@webstandardsgroup.org
 ***


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***

RE: [WSG] CSS off button

2010-01-25 Thread Erickson, Kevin (DOE)
Yes. I have a prototype with the imports and it DOES work. Thanks 

-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Ted Drake
Sent: Friday, January 22, 2010 5:46 PM
To: wsg@webstandardsgroup.org
Subject: RE: [WSG] CSS off button

That's because you have so many different css files
link rel=stylesheet href=/styles/import/508.css
type=text/css /
link rel=stylesheet href=/styles/import/core.css
type=text/css /

link rel=stylesheet href=/styles/import/body_content.css
type=text/css /
link rel=stylesheet href=/styles/import/general_html.css
type=text/css /
link rel=stylesheet href=/styles/import/header.css
type=text/css /
link rel=stylesheet href=/styles/import/leftnav.css
type=text/css /
link rel=stylesheet href=/styles/import/rightnav.css
type=text/css /
link rel=stylesheet href=/styles/import/custom_styles.css
type=text/css /
link rel=stylesheet href=/styles/import/footer.css
type=text/css /

It might work better if you had a base css that included imports within
it to the sub css files. When you switch that with a new css file the
imports should also be skipped. I haven't tested that, but I think it
would work.



-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Erickson, Kevin (DOE)
Sent: Friday, January 22, 2010 2:27 PM
To: wsg@webstandardsgroup.org
Subject: RE: [WSG] CSS off button

Thanks for the responses.
The reason I am looking for something along these lines it to have a
text only look. A state requirement by State of Virginia for all
government web sites.
I like the style switcher idea which I am already using but when I
switch to an alternate style it only changes what I specify in that
alternate CSS file. A blank CSS file would change nothing. Or am I
missing something about how to use the style switcher. I have it used in
the far right of the banner for changing the text size here:
http://www.doe.virginia.gov.

cheers

-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Oliver Boermans
Sent: Friday, January 22, 2010 4:54 PM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] CSS off button

Hi Kevin

On 23 January 2010 06:52, Erickson, Kevin (DOE)
kevin.erick...@doe.virginia.gov wrote:
 Could anyone please tell me if there is a right way to put a clickable

 button in a web page that will turn off all CSS?

Why do you want to switch off CSS?
Reasons aside, the simplest method that jumps to my mind is to use an
empty alternate stylesheet and some JavaScript to switch between it and
the default [presuming you have all your style in the one external CSS
file].

This rather old article explains the concept
http://www.alistapart.com/articles/alternate/

If you have the option, a server-side approach as Paul suggests would be
more reliable as it would work without JavaScript.

Comes back to why!?

Hope that helps
Ollie


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] CSS off button

2010-01-22 Thread Paul Novitski

At 1/22/2010 12:22 PM, Erickson, Kevin (DOE) wrote:
Could anyone please tell me if there is a right way to put a 
clickable button in a web page that will turn off all CSS?



To be perhaps overly precise, I'm guessing that you probably don't 
want to turn off *all* styling because that would render your 
document as one long string of undifferentiated text, but instead you 
want to keep the browser's default styling and/or the user's custom 
styling and suppress the page author's additional styling.


The approach would most likely be to strip out the style elements 
from the html head and the style attributes from all elements on the 
page. I think it would be unreasonable to ask a program to also 
suppress styling imposed by client-side scripting but if you were 
being paid enough this would be doable.


The best practice way to do this would be, first of all, to provide a 
submit button or link that asked a server-side script to re-deliver 
the current page with style elements and attributes removed. Then you 
could add a JavaScript layer that intercepted the button click and 
stripped away styling on the fly. I don't think removing the style 
elements in the head after a page is rendered has the desired effect, 
so you'd probably have to delete all the children of the style object 
in addition to deleting the style attributes on the page.


Depending on your purpose, you'd also want to decide whether to strip 
other presentational elements and attributes at the same time.


Regards,

Paul
__

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] CSS off button

2010-01-22 Thread Oliver Boermans
Hi Kevin

On 23 January 2010 06:52, Erickson, Kevin (DOE)
kevin.erick...@doe.virginia.gov wrote:
 Could anyone please tell me if there is a right way to put a clickable
 button in a web page that will turn off all CSS?

Why do you want to switch off CSS?
Reasons aside, the simplest method that jumps to my mind is to use an
empty alternate stylesheet and some JavaScript to switch between it
and the default [presuming you have all your style in the one external
CSS file].

This rather old article explains the concept
http://www.alistapart.com/articles/alternate/

If you have the option, a server-side approach as Paul suggests would
be more reliable as it would work without JavaScript.

Comes back to why!?

Hope that helps
Ollie


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



RE: [WSG] CSS off button

2010-01-22 Thread Ted Drake
I think your requirements may be a bit confused.
I would suggest you look at two articles
1. backwards compatible style switcher
http://www.alistapart.com/articles/n4switch/
2. zoom layout by Sir Joe Clark
http://www.alistapart.com/articles/lowvision/

Joe tells you why it's a good idea to create an alternate style sheet
that is single column, stark, and full of contrast. You could use this
theory to switch your user to a simplified style sheet that still
maintains some control 

The style switcher is the script that you are looking for. It's the
disable css button. If you really want to turn off css, just have it
switch to an empty css file.

Ted


-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Oliver Boermans
Sent: Friday, January 22, 2010 1:54 PM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] CSS off button

Hi Kevin

On 23 January 2010 06:52, Erickson, Kevin (DOE)
kevin.erick...@doe.virginia.gov wrote:
 Could anyone please tell me if there is a right way to put a clickable
 button in a web page that will turn off all CSS?

Why do you want to switch off CSS?
Reasons aside, the simplest method that jumps to my mind is to use an
empty alternate stylesheet and some JavaScript to switch between it
and the default [presuming you have all your style in the one external
CSS file].

This rather old article explains the concept
http://www.alistapart.com/articles/alternate/

If you have the option, a server-side approach as Paul suggests would
be more reliable as it would work without JavaScript.

Comes back to why!?

Hope that helps
Ollie


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



RE: [WSG] CSS off button

2010-01-22 Thread Erickson, Kevin (DOE)
Thanks for the responses.
The reason I am looking for something along these lines it to have a
text only look. A state requirement by State of Virginia for all
government web sites.
I like the style switcher idea which I am already using but when I
switch to an alternate style it only changes what I specify in that
alternate CSS file. A blank CSS file would change nothing. Or am I
missing something about how to use the style switcher. I have it used in
the far right of the banner for changing the text size here:
http://www.doe.virginia.gov.

cheers

-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Oliver Boermans
Sent: Friday, January 22, 2010 4:54 PM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] CSS off button

Hi Kevin

On 23 January 2010 06:52, Erickson, Kevin (DOE)
kevin.erick...@doe.virginia.gov wrote:
 Could anyone please tell me if there is a right way to put a clickable

 button in a web page that will turn off all CSS?

Why do you want to switch off CSS?
Reasons aside, the simplest method that jumps to my mind is to use an
empty alternate stylesheet and some JavaScript to switch between it and
the default [presuming you have all your style in the one external CSS
file].

This rather old article explains the concept
http://www.alistapart.com/articles/alternate/

If you have the option, a server-side approach as Paul suggests would be
more reliable as it would work without JavaScript.

Comes back to why!?

Hope that helps
Ollie


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



RE: [WSG] CSS off button

2010-01-22 Thread Ted Drake
That's because you have so many different css files
link rel=stylesheet href=/styles/import/508.css
type=text/css /
link rel=stylesheet href=/styles/import/core.css
type=text/css /

link rel=stylesheet href=/styles/import/body_content.css
type=text/css /
link rel=stylesheet href=/styles/import/general_html.css
type=text/css /
link rel=stylesheet href=/styles/import/header.css
type=text/css /
link rel=stylesheet href=/styles/import/leftnav.css
type=text/css /
link rel=stylesheet href=/styles/import/rightnav.css
type=text/css /
link rel=stylesheet href=/styles/import/custom_styles.css
type=text/css /
link rel=stylesheet href=/styles/import/footer.css
type=text/css /

It might work better if you had a base css that included imports within
it to the sub css files. When you switch that with a new css file the
imports should also be skipped. I haven't tested that, but I think it
would work.



-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Erickson, Kevin (DOE)
Sent: Friday, January 22, 2010 2:27 PM
To: wsg@webstandardsgroup.org
Subject: RE: [WSG] CSS off button

Thanks for the responses.
The reason I am looking for something along these lines it to have a
text only look. A state requirement by State of Virginia for all
government web sites.
I like the style switcher idea which I am already using but when I
switch to an alternate style it only changes what I specify in that
alternate CSS file. A blank CSS file would change nothing. Or am I
missing something about how to use the style switcher. I have it used in
the far right of the banner for changing the text size here:
http://www.doe.virginia.gov.

cheers

-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Oliver Boermans
Sent: Friday, January 22, 2010 4:54 PM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] CSS off button

Hi Kevin

On 23 January 2010 06:52, Erickson, Kevin (DOE)
kevin.erick...@doe.virginia.gov wrote:
 Could anyone please tell me if there is a right way to put a clickable

 button in a web page that will turn off all CSS?

Why do you want to switch off CSS?
Reasons aside, the simplest method that jumps to my mind is to use an
empty alternate stylesheet and some JavaScript to switch between it and
the default [presuming you have all your style in the one external CSS
file].

This rather old article explains the concept
http://www.alistapart.com/articles/alternate/

If you have the option, a server-side approach as Paul suggests would be
more reliable as it would work without JavaScript.

Comes back to why!?

Hope that helps
Ollie


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***