The two most abundant elements in the troposphere are Oxygen and Nitrogen. Oxygen has an 16 atomic unit mass while Nitrogen has a 14 atomic units mass. Since both these elements are diatomic in the troposphere (O2 and N2), the atomic mass of diatomic Oxygen is 32 and the diatomic mass of Nitrogen is 28.
Water vapor (H2O) is composed of one Oxygen atom and two Hydrogen atoms. Hydrogen is the lightest element at 1 atomic unit while Oxygen is 16 atomic units. Thus the water vapor atom has an atomic mass of 1 + 1 + 16 = 18 atomic units. At 18 atomic units, water vapor is lighter than diatomic Oxygen (32 units) and diatomic Nitrogen (28 units). Thus at a constant temperature, the more water vapor that displaces the other gases, the less dense that air will become.
You may be familiar with the concept that moist air is less dense than dry air. This is true when both have the same temperature or when the moist air is warmer. Said in another way, air with a greater percentage of water vapor will be less dense than air with a lesser percentage of water vapor at the same temperature. Often people erroneously believe that moist air is denser than dry air because very moist air is more difficult to breathe than dry air.