Have a quesiton about my Tribute page

Have a quesiton about my Tribute page
0.0 0

#1

I’ve completed my Tribute page about Mother Teresa. I just have a question about how can I introduce the image and the caption on a single box just like the example. Here is the link to my project. Any input or suggestions/corrections will be highly appreciated. Thanks! https://codepen.io/jeffescarilla/pen/QQVpNB


#2

Well you have already wrapped the image and the caption div a div with class=“thumbnail”, so you could either modify the .thumbnail class to have a different background color (I suggest white), maybe add a border to it and play around with the margin:top property if you want there to be a white space at the top. If you you only want a white space at the bottom (where the caption is) and a thin space around the top and sides, then I would suggest the following CSS:

body {margin-top: 100px;}
.center, .caption {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    padding: 5px 5px 0 5px;
    background:white;
}

.caption {
  padding-top: 0;
}