I'm not a PHP coder, but maybe doing things inline also helps.
<?php
if(basename($_SERVER['PHP_SELF'], '.php') == 'index')
{
?>
<style type="text/css">
#left {
width: 140px;
float: left;
}
#main {
margin-left: 150px;
}
#container {
width: 100%;
float: right;
margin-left: -140px;
}
</style>
<?php
}
?>
__________________