[eluser]Unknown[/eluser]
This is a bit of an overkill, why not just use a relative path for the images /
BTW in case you didnt know those <?=$blabla?> is the short version for <?php echo $blabla; ?>, so this can be done in any php script it's not necessarily for CI, the only thing is that you would have to include your css with a .php extension.