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
this is the div without text in it (the blue div is bob)
this is when i put text in it
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
Maybe try flex?
And put a gap of something
The codepen is gone
ty it worked
i reemoved it bc it got solved already