Static black hole horizons in cosmology