The proper method for attaching drywall to floor joists is by using screws or nails, spaced at appropriate intervals, to secure the drywall sheets to the joists. It is important to ensure that the fasteners penetrate the joists and hold the drywall in place securely. When installing on a ceiling, it is recommended to hang drywall sheets perpendicular to the joists for better support and to reduce the number of seams.