Why are rocks so close to a mid-ocean ridge younger than the ones that are farther away?

Mid-ocean ridges are basically underground volcanoes that lava from the Earth's Mantle can breach. The ocean, however, freezes the lava and that in turn forms rock. If this happens repeatedly, then the older rock gets pushed away from the source, and the younger, just formed rock is, therefore, closer to the ridge. So the younger rock being formed by the ridge is pushing away the older, previously made, igneous rock.