A new route for preparing CdX (X = S, Se, Te, S+Se) nanocrystallites dispersed in a sodium borosilicate glass matrix from a hydrogel is proposed. Chalcogenizing complexing molecules - for instance a mixture of NH4SCN + H2SeO3 - introduced in the starting solution allowed an in situ crystallite preparation concomitant to gel densification. Prevention of crystallite oxidation is thus obtained. Moreover, coalescence is minimized because of the low gel-glass transition temperature. Low temperature absorption spectra have been interpreted in terms of exciton and electron-hole confinements, accounting for both an intrinsic broadening of energy states inside each nanocrystal and a Gaussian size distribution. Crystallite sizes and size dispersion can be adjusted by changing the initial Cd concentration. The crystallinity of the nanoparticles without change in dispersion is strongly improved by thermal treatment above the Tg of the glass matrix.