How to use PHP inside css file

If you’re able to rename your CSS file “layout.php”, there’s no need for all of these workarounds: Your layout.php file would look like: Your HTML files would look like: This question is very similar: Include: css with php file extension?

CSS not working in Chrome

Comparing css links between the page you referenced and sub-pages, you have a “media” attribute in your link: Problem: Working: Try removing the “media” attribute and it should work fine. More specifically, it does not appear that “only” is a valid operating for the media attribute. See this W3Schools page for details.

body background color not showing?

Comment your Bootstrap include and see if the body is applied. You should try to test with the minimal amount of code first and then add in things. If that doesn’t work, you can use an inspector in Firefox or Chrome to see what CSS effects are applied. You also may want to use the … Read more