hello.
This code will add a css class recentpost if the post is newer than 7 days;
<div class="post <?php
$prevWeek = time() - (7 * 24 * 60 * 60);
$postDate = the_date('U', '', '', FALSE);
if($postDate >= $prevWeek) {
echo"recentpost";
}
?>">your post</div>