Disclosed herein is a composition for relaxing or straightening hair containing an alkaline material comprising hydroxide-containing compounds, a crosslinked copolymer of (meth)acrylic acid and/or (C1-C6)alkyl esters selected from a crosslinked (meth)acrylic acid/ethyl acrylate copolymer and a cross-linked anionic acrylate polymer, a cosmetically acceptable solvent, and optionally, thickening agents and surfactants. The compositions of the invention may be in the form of a gel that is clear in appearance or may be in the form of an emulsion when the compositions additionally contain a liquid fatty substance.