Grow your CSS skills. Land your dream job.

How To Add Links When Using Figure Class

  • MBM
    # May 11, 2013 at 11:24 am

    I have a div to align images, then a figure class for styling, the image link then the figcaption. I want to add a link around the whole thing so then when I click on the image it loads the linked page. What’s the correct way to do this?


    The green and pleasant lands of the Shire in Eriador – just West of the Brandywine River and East of the Far Downs.

    # May 11, 2013 at 11:38 am

    Just add the link inside the figure, it is perfectly fine to wrap elements with links in HTML5 (although works everywhere).

    Then set the link to “display:block” to fill up the available space.

    MBM
    # May 11, 2013 at 11:46 am

    Thanks. That failed validation but this works :



    The green and pleasant lands of the Shire in Eriador – just West of the Brandywine River and East of the Far Downs.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".