Hi!
Nofollow/ rel tags can only be declared in in A/link tags inside html so you dont need to look for it on other places other than on the link itself..
<a href="url" rel="nofollow">anchor text</a>
-- link is no-followed whereas if it doesnt have the rel="nofollow" in it means its do-followed
CSS/stylesheets can only affect the visual part of a site like colors, font size, etc.
That's mostly right, except for the "only" part. The OP is correct that nofollow can be defined in the head as well.
In the head you would use
<meta name="robots" content="nofollow" />
This will define ALL the links on the page as nofollow.
In the body you would use
<a href="http://www.example.com/" rel="nofollow">Link text</a>
This will define ONLY that particular link as nofollow.
In practice the type of pages that have nofollow defined in the head aren't the ones you'll be looking for to post links on, so you probably won't run across it very often. It's still worth checking for just in case though.
You are right though that you only need to look on the actual page. As far as I know there's no way to use css to define nofollow.
The typical way nofollow is applied selectively on a large scale is in php scripts. So if you're finding forums, wordpress sites or anything similar built with scripts then it's fairly easy for them to make all links in the comments section nofollow, while leaving the rest of the page links as follow. The result of php though is to actually send html to the browser, so regardless of how it was applied the result will still be in the final http. So all you need to know is that there is no robots no follow on the page and then just check the a tags to see if they are follow or not.
That's a lot of code the op will be looking through though. The best solution as already mentioned earlier in the thread is to use plugins or scripts already available to do the checking for you.