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
https://forums.phpfreaks.com/topic/35037-change-website-colors/#findComment-165254
Share on other sites

No it would be
<link rel="stylesheet" type='text/css" href="/path/to/css.css" />
/path/to/css.css = The relative url path to your css file.

It has nothing to do with CSS code UNLESS you are outputting the css with php dynamically for some reason (A user based cms, or something similar.
Link to comment
https://forums.phpfreaks.com/topic/35037-change-website-colors/#findComment-165260
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
https://forums.phpfreaks.com/topic/35037-change-website-colors/#findComment-165266
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
https://forums.phpfreaks.com/topic/35037-change-website-colors/#findComment-165272
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.