I recently had a problem with centralizing an image in a carousel - specifically, I couldn't vertically align it in the center. I did some digging and found an answer here: How to center image in carousel. However, the answer by smidkristian only tells you how to horizontally align the image. So I wrote an answer below which also includes how to vertically align the image (I'm yjzhou).
I'm new to posting in SO - so I'm afraid I didn't fully follow guidelines though I hope I did. in the guidelines to writing answers I was prompted to not respond to other answers, so I didn't mention his answer. I hope what I did was okay? And if it wasn't could someone tell me where I went wrong and how can I improve?