This didn’t work for me the first time, although it does in fact work perfectly.
The problem is that php will set the category as ‘post’ plus ‘ firstpost’, and having the class ‘.post firstpost’ doesn’t work as the browser will be looking for a <firstpost>
tag. So I changed it to this:
<div class="post<?php if(!is_single() && $post==$posts[0]) echo '-first';?>">
Thus, the first post is ‘.post-first’ and every other post is just ‘.post’ .