Ron,
details, baby, details
re: the "Done, but with errors" usually means Javascript errors. click that msg to get details. Note that Javascript is widely acknowledged as the work of Satan himself, so good luck... (only slightly kidding! oy!)
re: when I put my PHP right before my HTML, my CSS doesn't work right-- say what? try looking at the final web page source code (i.e. 'view source' in the browser) to see EXACTLY how the browser is reading and attempting to parse your code.
I also HIGHLY recommend the Firefox browser, not only for all the usual reasons (security being #1) but because there's a fabulous strong programmer's debugging toolbar that helps with CSS and a million other things.
best
Eric