A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2008 yearWeb page -user custom style - page 1
User InfoPosts
Web page -user custom style#1
How can I give the user the ability to change the style of a webpage, of course I have to make several CSS files , but how can I make the code that permits the change upon the user's choice

posted date: 2008-12-29 23:02:00

Re: Web page -user custom style#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2008-12-29 23:02:01

Re: Web page -user custom style#3
We're all pretty unlikely to give an answer as thorough as A List Apart's.They even provided some freely-usable code for you.

posted date: 2008-12-29 23:18:00

Re: Web page -user custom style#4
You would basically have css classes for all the major components of the page such as header, content, footer, nav_menu items, heading, etc. Everything that you want the user to be able to customize you would create a css class/ID for it.Then you would show all these classes to the user and let him either type in the CSS code manually, or show him dropdown boxes with all the possible colors, for example, or other settings.When the user changes an option, you could use javascript to change that property of the css ID/class he selected. E.g if he changes the background color of the header from black to blue, you could do this:document.getElementById("header").style.background-color="#ABCDEF";(Jquery might have an easier way of doing this)At the end of the page you could have a submit button which would POST all the css settings to a php script, which would write these settings to the database. Then you would do a query like:SELECT css_id,css_class,css_code FROM css_styles WHERE user_id='$user_id';This would return all the css code, and then you would put this in the <head> command instead of an external css file.

posted date: 2008-12-30 00:14:00

select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.