Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic CSS

Status
Not open for further replies.

SjrH

IS-IT--Management
Jun 24, 2003
747
GB
Is it possible to customise the look of a website using CSS based on a users preferences?
Lets say you have 2 basic design layouts that perhaps differ in colour, background, text or borders. Is it possible to present one to a user once logged in, or even using a cookie?

Thanks
 
The "standard" technique is to use server-side code, to load a completely different style-sheet based on stored user preferences. The best place to store those preferences is, of course, in a database or other server-side persistent data store (an XML file would work).



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
There are a number of good articles at A List Apart that can help you with this.




Your exact approach and storage requirement would depend on how you wanted to let the user customise their display.
i.e. Have a set of preset styles or, for example, let the user change the look of each individual element.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
Thanks guys!
The site will use php so i'll read up on that....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top