A chalazion is another type of eyelid lump that is often confused with a stye. While a stye is caused by a bacterial infection, a chalazion is caused by a blockage in the oil gland of the eyelid. Unlike a stye, a chalazion is usually painless and can develop slowly over time. The lump may be visible on the eyelid, but it is often located inside the eyelid. Treatment for a chalazion is similar to that for a stye, but it may take longer to heal.