![]() |
Style from source to CSS stylesheet file?
Hi,
I noticed that in source of page there is a lot of style code. It makes pages loading slower and consume transfer every time page is requested. I want it to be in *.css file so it can be saved on visitor's disk. I hope there is easy way to do this. Cheers. |
There are specific reasons for that although I am aware that it is not ideal.
You can copy the inline CSS from the source code of the browser rendered page, then paste it into the bottom of style.css, then delete or commment the whole dynamic CSS part in header.php. After you've done this, CSS related theme option changes wouldn't propagate anymore. So the above is something you should only do after you're done with all theme customizations. |
Thanks, it works.
But isn't it possible to generate *.css file by PHP? I think it is, but I'm not experienced in PHP enough yet ^^. |
Rendering .css as PHP would require changes in the web server setup and greatly reduce my install base so this is out of question. A .php file can be used as external CSS file but IE6 sometimes won't load that if it takes too long until that file is processed. It 's also not trivial to pull items from the WP database from an external non-standard file. I had a working version of that in an earlier 3.x version of Atahualpa
|
All times are GMT -6. The time now is 11:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.