The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Vertically align text above image:

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #207985


    On this site:

    I’m trying to vertically align the text that appear when you hover over the images in the image gallery. It’s fine now on a large screen but at a window width of say 816px the element a.envira-gallery-link:before appears more at the bottom of the gallery image.

    I know I can change the line height of the text at every widow size, but there has to be an elegant way to center the :before text.

    Thanks so much for any help!


    Thanks Paulie! Super helpful!!

    One question: It’s only centering for me if I put the calc at ~83% rather than 100%… do I have something else in the code that shouldn’t be there?

    Thanks so much!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.