Hinged shower doors will sag when the hinges become loose or bent. Door hinges with loose hinge screws can usually be adjusted to close without sagging, but damaged hinges will typically need to be replaced.
Adjusting Shower Door Hinge Screws
Shower doors often fail to fit and close properly not only because their hinge screws have become loose but because the weight of the door has pulled the door down until it no longer fits in place when it is closed. Typically, you can make these sagging doors fit properly again by loosening the screws, raising the door, and re-tightening the screws.