skip to Main Content
Test 3

Test 3

I was recently attempting to write some HTML/CSS that would align-center an image and a caption below it, and have them both be part of the same link. At first I though this would be really easy. However, this proved to be a lot more difficult than had anticipated. Despite what I tried, I could not get it to happen. I thought it was going to be as simple as placing both elements within an anchor element. Then, I figured I would place the anchor element, which contained the image and text, inside of the div. Well, this and about a half dozen other approaches didn’t work. Then, after some Googling and reading though some trusty books, I was lucky enough discover the “figure” and “figcaption” elements – WOOHOO!

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe

Sign up with your email address to receive news and updates.

Back To Top