On 12/8/05, Christine Harcinske <[EMAIL PROTECTED]> wrote: > Hello, > > I'm working on a project for a college web design class and would love to use > alternate style sheets. I have been trying to use Paul Sowden's article at A > List Apart (http://www.alistapart.com/stories/alternate/) as a guide, but I'm > running into some snags.
Maybe if I share my code with you, you might find the problem. My switcher uses this to write the cookie: <?php setcookie ('sitestyle', $set, time()+31536000, '/', 'rdpdesign.com', '0'); header("Location: $HTTP_REFERER"); ?> I then have this for the stylesheet link tag: <link rel="stylesheet" type="text/css" media="screen" title="user defined" href="<?php echo (!$sitestyle)?'default':$sitestyle ?>.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="access" href="/access.css" /> and this for the switcher links: <a href="/switcher.php?set=default">Default Style</a> <a href="/switcher.php?set=access">High Contrast</a> So clicking the links sets the variable $set to default or access, then when the page reloads it writes the variable $set to the 'sitestyle' cookie, and then the link tag is written with the variable $sitestyle that comes from the cookie. Hopefully your mail client didn't eat up those tags. Let me know if this helps. -- -- Christian Montoya christianmontoya.com ... rdpdesign.com ... cssliquid.com ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/