What causes you to have a loss of height when you have osteoporosis?

Fracture. Compression fractures of the spine lead to height loss. The bone collapses and you shrink. These can be painfree, so if you lose more than an inch in height, see your doctor and consider an xray.