Why does sodium chloride not conduct electricity as a solid but when melted, does conduct electricity?

Thanks

Solid NaCl consists of a three dimensional array of Na^+ and Cl^-. Even though the ions are present, the ions are not free to move about; i.e., they are held in place by crystal lattice forces that make up the solid. They CAN vibrate, and do, but they are not free to move from one spot to another and that is necessary for electrical conduction to take place. When NaCl melts, however, the crystal lattice is broken down (energy is supplied by the heating device used--bunsen burner or hot plate) and in liquid form the ions ARE free to move from one place to another. Therefore, the ions can conduct electical current from one electrode to another. I hope this is clear to you.