When the family of functions vanishing at infinity is ideal of C(X)