You need to switch your values:
/* No greater than 900px, no less than 400px */
@media (max-width:900px) and (min-width:400px) {
.foo {
display:none;
}
}?
Demo: http://jsfiddle.net/xf6gA/ (using background color, so it's easier to confirm)