ionic compounds such as sodium chloride are arranged in a giant three-dimensional lattice structure, which is a regular repeating pattern of positive and negative ions. There are strong electrostatic forces of attraction that hold the oppositely charged ions together in the giant lattice.