I guess you are using a custom menu, because it’s supported in the wp_list_pages function.
XHTML
<ul id="menu">
<?php wp_list_pages('depth=1&title_li=');?>
</ul>
CSS
#menu li.current_page_item a { /* the active page */ }
As for the categories I found out the active category get current-cat class so that should take care of that styling too.
.current-cat { /* the active cat */ }
This is cool, but I have a slight problem implementing it in my menu.
I have a custom menu with a link to a category template. The other two pages highlight fine when current, but not this category template. Any ideas? Code below.
<ul id="menuenu">
<?php
wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
<li><a href="<?php bloginfo('url'); ?>/?cat=62">Portfolio</a></li>
</ul>
Whaddya know, I figured it out…
<ul id="menuenu">
<?php
wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
<li class="page_item <?php if (is_category('62')) { echo "current_page_item"; }?>"><a href="<?php bloginfo('url'); ?>/?cat=62">Portfolio</a></li>
</ul>