Jump to content

Change Website Colors


Warptweet

Recommended Posts

XHTML/CSS, the styling and coloring would have nothing to do with PHP unless you were simply outputting different CSS styles with php.  The entire thing that would control the style's is CSS.
in an external stylesheet, to the style you want to add a background color add
background-color:#CCCCCC;
or whatever other hex code for whatever other color you wanted, the background would change to that color.
Link to comment
Share on other sites

The easiest way to do this using PHP, if I understand your question correctly, is to set a field in your database, for example, bgcolor. then when the page loads do something like:

[code]<style bgcolor="$bgcolor">[/code]

If you have the variable 'modify-able' by the user, when the refresh the page the bgcolor will be set to whatever they selected. You might want to do some looking into PHP / Stylesheets. There are some good examples of 'php-enabled' stylesheets on the web.

[url=http://www.barelyfitz.com/projects/csscolor/]http://www.barelyfitz.com/projects/csscolor/[/url] is a good place to start :)

Scot
Link to comment
Share on other sites

Well, maybe not

If you wanted to do it instantly, (low level), use javascript and cookies (sessions)

Or if you wanted them to really have long distance editing capabiliteis (They had there own pages, you wanted them having permanent control over), save the settings in a database, then let php fetch those settings based on there ip when they return
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.