I\'ve a code of some what like this:
div > img:first-child {/*the first image*/} div > img:last-child {/*the last image*/}
That should do it.