We study the evolution of stellar content and the chemical enrichment of th
e universe averaged over the whole population of galaxies by means of a ser
ies of chemo-spectrophotometric models that take into account the metallici
ty and dust obscuration effects. We investigate various classes of cosmic s
tar formation rates (CSFR) histories consistent with current estimations. W
e are able to reproduce a variety of observational constraints such as the
emissivities at rest-frame 0.44, 25, 60 and 100 mum of the local universe a
nd also the overall shape of the extragalactic background light from UV/NIR
galaxy counts and the cosmic infrared background (CIB) from DIRBE/FIRAS me
asurements. We find that the CIB at 140 mum is crucial for discriminating b
etween the CSFR histories. The best-fit model to this constraint seems to f
avour mid-infrared derived CSFR at low-z and a flat CSFR at higher z consis
tent with the most recent estimations, although the shape of the CSFR at hi
gh redshifts has little impact on the FIR/submm part of extragalactic backg
round. We suggest that the bulk of the CIB energy is produced by a populati
on of moderately obscured normal galaxies lying at 0 less than or equal to
z less than or equal to 1. We then derive the global chemical enrichment an
d stellar content of the universe and find that this model predicts metalli
cities in good agreement with the metallicity in DLAs given that some outfl
ow of metal-enriched gas from galaxies is assumed but it overproduces the c
urrent present-day stellar mass density and NIR luminosity density.