Tribute page - problem with bootstrap - formating inside div

Tribute page - problem with bootstrap - formating inside div
0

#1

Good afternoon!

here is my codepen of my first project from freeCodeCamp, pretty excited how it finished and I’ve heaven’t cheated and copied all code! Also it passed validation on w3 so I consider that as a success.

What is the question here - in
<div class="caption text-center"><p style="font-size: 12px;">Elon Musk, CEO of Tesla Motors Inc., talks about the Model X car at the company's headquarters, Sept. 29, 2015, in Fremont, California.</p></div>
I would like to vertically center this paragraph. What parameter can I add so I don’t have to hard code it into CSS and the text is in the center of the thumbnail?

Thank you!


#2

If I understand you, you want the caption text to be centered vertically in the space it’s given? Try changing it to a span. The p is getting an automagical bootstrap margin-bottom of 15px.

<span style="font-size: 12px;">Elon Musk, CEO of Tesla Motors Inc., talks about the Model X car at the company's headquarters, Sept. 29, 2015, in Fremont, California.</span>


#3

Yes, that worked, thanks!