One of keys to understanding how star-forming galaxies evolve is to study the inter-stellar medium (ISM). The last decade of high-redshift, observational studies have shown that the conditions within the ionized ISM of high-redshift (z>1) star-forming galaxies are very different to what is observed in local galaxies. Unfortunately this is where the consensus ends. There still exists a somewhat confusing and heated debate over what is driving the observed changes. My Masters project aimed to address the lack of consensus over the evolution of two properties of the ionized ISM; the electron density and ionization parameter. By analysing matched samples of local and high-redshift galaxies we showed how these two properties evolve over cosmic time. In this talk I present our strategy of matching (and stacking) galaxies and the key findings of our work.