How does Gravity Affect a Person Height?

You would think gravity would only have an affect on your weight, but it also affects your height. When astronauts go into space, they come back slightly taller because the further you are from Earth the less gravitational force is present. They return to their regular height within a day or two of coming home.