Alternating layers of different materials with sub wavelength thickness in one dimension are used for controlling the propagation of electromagnetic waves owing to their ability to selectively transfer and confine photons of specific wavelengths, called photonic band gap (PBG). Temperature independent large PBG in the visible wavelength range is highly desired for many applications and we have theoretically investigated the thermal and layer thickness dependence on PBG and proposed a novel strategy to choose materials based on their coefficients of thermal expansion and thermo optic effect. The thermal dependence of PBG can be eliminated by making the spectral shift due to thermo optic effect equal and opposite to that of the thermal expansion effect. We have chosen ZnS/CaF2 multilayers for the design of 1D photonic crystal (PC) and our calculations have shown that the spectral shift due to thermal fluctuations could be significantly reduced by the negative thermo optic coefficient of these materials compensated by the positive thermal expansion coefficient. The proposed 1D PC shows a temperature dependent spectral shift of ∼14 pm/oC in the visible range.