How are the results being fed? For browser compatibility, I would make the first item have a specific class, which can be targeted via CSS:
HTML:
<div class="item first-item">Item One</div>
<div class="item">second item</div>
<div class="item">second item</div>
<div class="item last-item">last item</div>
CSS:
<style>
.item { margin:8px 0; }
.item.first-item { margin:0 0 8px; }
.item.last-item { margin:8px 0 0; }
</style>