Forums

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

Home Forums CSS Vertically align to centre in Floating div

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #254145
    plw
    Participant

    https://pencopyediting.com/

    How do I get the competition details next to the slider to vertically align to the middle of the div instead of at the top.

    Thanks

    #254147
    Beverleyh
    Participant

    Try out the techniques detailed here https://css-tricks.com/centering-css-complete-guide/

    If you need further help, please provide a reduced demo in CodePen. Just enough HTML and CSS to demonstrate the problem, that way, we don’t have to poke about in the developer console and/or filter through the rest of your codebase

    #254161
    plw
    Participant

    Thanks that has worked.

    I tried something like that yesterday which didn’t work as it went too far down but I didn’t put transform: translateY(-50%);

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