homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

CSS styles..
letting user select preference

WebmasterWorld Senior Member suzyuk us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 357 posted 10:54 am on Oct 18, 2002 (gmt 0)

I've created a site that's very simple, and have created a few different colour schemes for this site, I would like to offer the viewer the chance to select their preference..

Could I have some ideas as to how this can be achieved?

I use asp and realise it could probably be done with the querystring, but how would I maintain state, and would it better to use a cookie? or are there any other ways? I've seen the same thing done to offer text size (which I may add too!)

advice appreciated




WebmasterWorld Senior Member 10+ Year Member

Msg#: 357 posted 12:13 pm on Oct 18, 2002 (gmt 0)

I've pondered the same thing...

I'd say it depends on what you want to achieve, for myself I want to offer this as an added bonus/incentive to register so if the user likes the site enough to register then they wouldn't object to a permenant cookie if they want to automatically have the site use their CSS choice.

However if I were doing this as a feature accessible to all I'd give them a selection of styles and their chosen one is then stored in the session (a non-permenant/session cookie) as so will last for the duration of their visit, but with an option to store a cookie to use that style on subsequent visits.

There are more cunning non-cookie solutions but they require a little too much thought (working solely server-side they are also more error prone), plus having just come back from a hot lunch what I want now is a little snooze.

If your site will allow the fonts to scale via the browser settings then I wouldn't offer a text-size option because as long as you stick to a normal basic size then I'd assume most people would have set their browsers to render the normal sized fonts at a size they are comfy with

- Tony

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved