PHP and CSS


#1

I am creating a css file using php to generate it. My problem is that I lost all coloring of the css. I can’t find a package to fix this… What are my options?


#2

The language package has to be specifically designed to support embedding another language. Please share one of your files so that we can get a better picture of what you’re working with.


#3
<?php
    header("Content-type: text/css; charset: UTF-8");
    $pattern = $sql->fetch_row('select pattern_id, pattern_format ...');
?>
.cover {
    background-image: url("/pattern<?php echo @$pattern['pattern_id'] ?>.<?php echo @$pattern['pattern_format'] ?>");
    background-size: 350px 350px;
}

#4

Do you have this in individual files, or is there a possibility of CSS declarations being used inside a PHP file that also generates HTML?


#5

This is a php file that generates only css. I declare that it is a css file in the header (line 2). I am changing dynamically a background image because in the admin page there is an option to change the image.