2
Streamlining CSS with PHP goes against good practices?
I need to change the header background image of a page according to her article. I thought about writing the CSS inside a PHP file for this, but I don’t know if it’s considered a good practice... or worse, a bad hearing.
NOTE: I also thought about doing this using AJAX so as soon as the page loads, it access the database, take the name of the image and change in CSS.
I use this device on some of my websites, depending on the version (Portuguese, Italian, Spanish or English) the background image is the country of the chosen version. There is no other way because it is a single php page that builds the html in the chosen version. But you can make your css file and leave the style in php only from the background image part.
– user60252