DEV Community

Discussion on: CSS Challenges #2 | Tooltips

Collapse
 
tartufu profile image
Edmund Teo Chang Hao

Created an account just to try this challenge. Not too sure how i can make the text aligned in the middle of my div without causing the text to shift position when the tooltip appears...

codepen.io/teo-chang-hao/pen/QWWNoVE

Collapse
 
lautarolobo profile image
Lautaro Lobo

Hey, cool! I think that if you add margin: 0 auto to .tooltip, you'll se your div content at the center without issues (I tried it myself within your CodePen and worked).