It is narrated from Sayyiduna Abu Usayd (may Allah be pleased with him) that he heard the Messenger of Allah (peace and blessings be upon him) while he (peace and blessings be upon him) was coming out of the mosque, and the men and women had become mixed together on the road. The Messenger of Allah (peace and blessings be upon him) said: "(O women!) Draw back, for it is not proper for you to walk in the middle of the road; keep to the sides of the road." So a woman would cling to the wall so closely that her garment would catch on something on the wall because of her clinging to it.
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 16629