rajmohan Posted September 15, 2006 Share Posted September 15, 2006 Hello guys,I am using css body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #FF0066;}for background color,i what to change the background color througt php whether it is posible please help me Quote Link to comment Share on other sites More sharing options...
Jenk Posted September 15, 2006 Share Posted September 15, 2006 elaborate what you mean by "change through php"Before the page is loaded?After the page is loaded? (Not possible) Quote Link to comment Share on other sites More sharing options...
rajmohan Posted September 15, 2006 Author Share Posted September 15, 2006 i need like this body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: <? $colorinsert; ?>}this what i need helpbecause i am generating a page where they can also change the background color Quote Link to comment Share on other sites More sharing options...
markbett Posted September 15, 2006 Share Posted September 15, 2006 then what you need to do is have PHP write the css file...... well i guess you could tell the webserver that CSS files should be processed by PHP by adding the css extension, then the php engine would go through nad parse that all out...... Quote Link to comment Share on other sites More sharing options...
rajmohan Posted September 15, 2006 Author Share Posted September 15, 2006 sorry i am new to field please guide me how to write the file Quote Link to comment Share on other sites More sharing options...
markbett Posted September 15, 2006 Share Posted September 15, 2006 if you are using inline css then you just need to make sure the php engine parses the file... give it a php extensionhttp://www.tizag.com/cssT/inline.phpif you arent using inline css then you need to set your webserver to have php process css files. if you want help doing that then talk to your sys admin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.