The way in which you walk can also have an effect on your posture. When you have improper posture, your center of gravity changes. This can cause your balance to decline, which can cause pain when walking, thus creating a vicious cycle of overcompensation.