Yes. While there are certain ordering rules for applying capital losses against capital gains, ultimately, long-term capital losses can offset any short-term gains.
Dividends received after 2002 and before January 1, 2011, that are taxed at the long-term capital gain rate.