can short term losses offset long term gains
Yes, but there are limits. Losses on your investments are first used to offset capital gains of the same type. So short-term losses are first deducted against short-term gains, and long-term losses are deducted against long-term gains. Net losses of either type can then be deducted against the other kind of gain. So, for example, if you have $2,000 of short-term loss and only $1,000 of short-term gain, the net $1,000 short-term loss can be deducted against your net long-term gain (assuming you have one).