Can be used in a template
.about-banner {background-image: url(http://example.co.uk/mysite/wp-content/themes/mysite2013/img/".$pagecomp.");}
";
And using a more relative way ";
.about-banner
{background-image: url('/wp-content/themes/codehaven/img/".$pagecomp."'); height:297px; padding:20px;}
?>