Jack Cork and Lallana combined with each other to force the West Ham defence to drop deep, but Guy Demel made a clearance in the end to deny the former a tap-in.
Then on the half-hour mark Vaz Te outran Fox on the right wing and rolled the ball back across the box for Nolan to shoot at goal, but Southampton defender Jos Hooiveld made a timely block.
The Hammers had goalkeeper Jussi Jaaskelainen to thank 10 minutes before the half-time interval as he made a good save to keep out Rickie Lambert's effort from close range with the help of the post.
Andy Carroll had a good chance for West Ham 10 minutes into the second half when he found himself with the ball just outside the six-yard box, but the England international striker dragged his shot wide.
That miss came to haunt the visitors four minutes later, as the Saints broke the deadlock when Ramirez shot home past Jaaskelainen with a fine effort.
However, Carroll redeemed himself for his earlier miss on 66 minutes when he turned in Gary O'Neil's free kick off the foot of Steven Davis.