Fourier series is just the representation of your periodic signal in sine and cosine waves. It just decomposes your signal into these sine-cosine waves. The reason you can't do it for an aperiodic signal is that you would lose out some information while decomposing it.
That is where the Fourier transform comes into the picture. It TRANSFORMS your aperiodic signal into the CONTINUOUS frequency domain where it can be easily represented.
In fact, Fourier series coefficients of a periodic function are sampled values of the Fourier transform of one period of the function (make rest of the function non-zero, thus making it aperiodic, thereby calculating Fourier transform).