The present disclosure relates to a hair cosmetic composition comprising: at least one anionic fixing polymer, at least one polyol, at least one liquid fatty alcohol, at least one lower C1-C4 monoalcohol, and at least one propellant gas, comprising a water content of less than 10% by weight, with respect to the total weight of the composition, and wherein the hair cosmetic composition is packaged in an aerosol device. Also disclosed herein is a the use of this composition, as well as a method for styling and shaping the hair, such as providing hair with a styling effect.