If you have a window that slides open from left to right, and a regular window air conditioner, don't install the appliance in the window by turning it on its side. Running the appliance this way will quickly burn out the compressor, which is located inside the unit. Both the oil and the freon that the compressor uses will flow out and cause damage. In addition, the air conditioner is designed to drain condensation a certain way. Turning the unit on its side stops it from draining properly, which can potentially result in the condensation draining onto carpeting or wood interior surfaces, where it causes damage.
One possible solution to paring a regular air conditioner with a window that slides side-to-side is when the air conditioner's width fits the window. Slide the window open as wide as possible, and measure how wide the opening is, using a tape measure. Also measure the air conditioner's width, and see if the window opening is large enough to contain the unit. If so, measure the height of the air conditioner and the height of the window opening. Cut a piece of plywood to size, so that it will fill the open gap left between the top of the air conditioner and the top of the window opening. If this is the only window available, cut out an opening in an exterior wall of a wood-framed house, and install the window air conditioner through the wall. This isn't viable in a brick building or if you rent an apartment.
Casement Air Conditioners
Casement air conditioners are specifically designed to fit into the vertical space of more narrow window openings, such as with casement windows and side-to-side sliding windows. Make sure to install the platform on the window frame that a casement air conditioner needs to sit on, for support. Even with a casement air conditioner, there is usually an open space between the top of the unit and the top of the window opening. Cut a piece of plywood to the same size and seal that space with it. This type of air conditioner generally costs more than a regular window air conditioner.
Regardless of whether you install a regular window air conditioner or a casement window air conditioner into the vertical opening, make sure you install it correctly. This helps you avoid future problems. On both air conditioner types, tilt the back end that hangs outside slightly downward, so that the condensation drains out properly. Seal small, open spaces between the air conditioner and the window opening with foam weatherstrips, to prevent drafts. These small openings can exist with a casement air conditioner or a standard window air conditioner.