Nails that are brittle, discolored, or unusually thick are likely to have a fungal infection. A fungal infection may cause nails to crumble and crack easily. They may turn white or yellow. The entire nail may loosen and lift off and the surrounding skin can swell and grow painful.