Is it a good idea to using <?php include "main.css.php"; ?>
instead of <link rel="stylesheet" href="main.css">
? From server resource (will it makes my server heavier) and user experience (page loading time) point of view. The main angle here is will php include css download multiple times as opposing to html link, or will they both only have to download one time (http request one time).
P.S.
Initially, I am doing this because by using php I can give custom colors and other settings a name, so I don't have to using class name for html (ever put multiple class names in lots of html elements? The readability is a pain). Later on, I can make my css dynamic, which lead me to do lots of powerful stuff. The advantage goes on.
It is not good to use such practice
But if you want you can use this
Make your css file main.php
<?php header("Content-type: text/css; charset: UTF-8"); ?>
body{ margin:0px; font:9px/11px "Tahoma", Arial, Helvetica, sans-serif; color:#010000;
background:#f3f6e1 url(<?php echo base_url().'public/';?>images/body_bg_1.gif) repeat-x 0 0}
And include it in the page where you want
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="css/main.php" media="screen">
</head>