Electromagnetic force in dispersive and transparent media