Optical beams are self-focused and self-trapped upon initiating crosslinking in photoresists. This nonlinear optical phenomenon is apparent only for low average optical intensities and produces index of refraction changes as large as 0.04. We propose using the self-focusing and self-trapping phenomenon in projection photolithography to enhance the resolution and depth of focus.