If it "doesn't work when you include it the way you do on a static page", chances are you're treating the reference to your CSS as a PHP command. Try either of these suggestions:
Print it with echo:
echo "<link rel="stylesheet" type="text/css" href="main.css">";
that is not going to work because of the "" marks inside the echo command. So you'd have to use:
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"main.css\">";
The \ symbol forces PHP to treat the next character as nothing but a character, removing of all its effect in the syntax.
You can also use the <? ?> delimiters to get out of PHP mode, declare your CSS and get into PHP mode again:
<?php
...(some PHP code)
?>
<link rel="stylesheet" type="text/css" href="main.css">
<? ...(some more PHP code)...
?>
HTH,
Luciano ES