div goes down when i put text in it

so basically i have like a div and it has a lot of images inside it along with another div(lets call said div "bob") so basically bob is inline-block and bob is fine on its own and the top of bob meets the top of his parent div and the bottom of bob meets the bottom of his parent div, but whenever i put text inside bob (ex. <div class="bob">hello im bob</div>, or <div class="bob"><span>hello im bob</span></div>) bob shifts down so that the top of bob is somewhere in the middle of the parent div (a bit towards the bottom) and the bottom of bob is far below the bottom of the parent div
6 Replies
! konold
! konold11mo ago
this is the div without text in it (the blue div is bob)
! konold
! konold11mo ago
this is when i put text in it
! konold
! konold11mo ago
https://codepen.io/boredom4114/pen/gOQZOgKand this is the link to the codepen btw please ping me when you answer the question bc i think it might take a while and ill probably be afk or something
ME
ME11mo ago
Maybe try flex? And put a gap of something
croganm
croganm11mo ago
The codepen is gone
! konold
! konold11mo ago
ty it worked i reemoved it bc it got solved already