User login

How to add a node id to a page's CSS classes

If your page.tpl.php already prints $body_classes (or equivalent) in the <body> tag, then you likely need only to add a single line to have the nid included with a class such as "node-1".

drupal add node id to theme template
drupal add node id to page template

http://drupal.org/node/360484