Codependence is a dysfunctional pattern of living and problem solving learned and absorbed during childhood. It happens due to growing up in a family where there is a great deal of chronic emotional pain or trauma and unhealthy boundaries. Examples of these are families where there was: unskillful parenting, a critical or non-nurturing environment, domestic violence, physical, sexual or emotional abuse, substance abuse or addiction, or chronic mental or physical illness. However, just like individual people, not all families can be so neatly categorized. Codependence can happen in any family where parents are trying their best, but learned unhealthy patterns of relating.
In these families there are no appropriate boundaries for the child to experience or learn. Some grow up with no personal boundaries at all. They take in all the negativity of others’ fears, attacks, anger, and criticism. Everything gets in and overwhelms them resulting in no clear sense of identity. Others grow up with rigid boundaries, never allowing anything positive inside, like love, admiration, compliments, and nurturing.
To be emotionally healthy , and have healthy relationships, we need to develop permeable boundaries: to have a selective filter that keeps out the negative but lets in the positive. This results in a person with healthy self esteem.
A good book to help you with this issues is Codependent No More by Melodie Beattie.