  We study the evolution of stellar content and the chemical enrichment of the
universe averaged over the whole population of galaxies by means of a series of
chemo-spectrophotometric models that take into account the metallicity and dust
obscuration effects. We investigate various classes of cosmic star formation
rates (CSFR) histories consistent with current estimations. We are able to
reproduce a variety of observational constraints such as the emissivities at
rest-frame 0.44, 25, 60 and 100 $\mu$m of the local universe and also the
overall shape of the extragalactic background light from UV/NIR galaxy counts
and the cosmic infrared background (CIB) from DIRBE/FIRAS measurements. We find
that the CIB at 140 $\mu$m is crucial for discriminating between the CSFR
histories. The best-fit model to this constraint seems to favour mid-infrared
derived CSFR at low-$z$ and a flat CSFR at higher $z$ consistent with the most
recent estimations, although the shape of the CSFR at high redshifts has little
impact on the FIR/submm part of extragalactic background. We suggest that the
bulk of the CIB energy is produced by a population of moderately obscured
normal galaxies lying at $0\le z \le 1$. We then derive the global chemical
enrichment and stellar content of the universe and find that this model
predicts metallicities in good agreement with the metallicity in DLAs given
that some outflow of metal-enriched gas from galaxies is assumed, but it
overproduces the current present-day stellar mass density and NIR luminosity
density.
