Many appliance manufacturers are now making smaller washing machines. This includes Electrolux, whose WA SL3M 101 will fit in most places with less available free space, since it measures 24" in width, 33" in height, and 24" in depth. Bosch makes the Axxis line of compact washers, which are also somewhat slim at under 24".
If space is an issue, then it's possible to choose some smaller washing machines to fit your place. There is a whole segment of the market specialized in compact and portable washing machines. They can be harder to find, as most customers will buy full-sized washers, but most big box stores will offer some of them. We've found some at Walmart, and there are sure to be ones available at other stores.
The Clatronic washing machine is an example of very small washing machine that will fit almost anywhere. The smaller size will cut down on electricity and water usage as well. Walmart has quite a few of these smaller washing machines. They start out at $190 and go up. The ones from Haier fit the bill.