Luke 1:34-37
How will this be, Mary asked the angel, since I am a virgin?
35 The angel answered, The Holy Spirit will come upon you, and the power of the Most High will overshadow you. So the holy one to be born will be called the Son of God. 36 Even Elizabeth your relative is going to have a child in her old age, and she who was said to be barren is in her sixth month. 37 For nothing is impossible with God.
The New International Version, (Grand Rapids, MI: Zondervan Publishing House) 1984.
The relationship existed through Mary and not Joseph.