use css logic for select first and last post