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 Link to comment https://forums.phpfreaks.com/topic/20838-help-please-how-to-call-php-inside-css/ 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) Link to comment https://forums.phpfreaks.com/topic/20838-help-please-how-to-call-php-inside-css/#findComment-92231 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 Link to comment https://forums.phpfreaks.com/topic/20838-help-please-how-to-call-php-inside-css/#findComment-92233 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...... Link to comment https://forums.phpfreaks.com/topic/20838-help-please-how-to-call-php-inside-css/#findComment-92238 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 Link to comment https://forums.phpfreaks.com/topic/20838-help-please-how-to-call-php-inside-css/#findComment-92240 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 Link to comment https://forums.phpfreaks.com/topic/20838-help-please-how-to-call-php-inside-css/#findComment-92247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.