1

I've built this responsive site that is running Woo Themes Flexslider 2.

I'd like to vertically align the video and copy to the middle of the page. I've tried using flexbox on <div class="center"></div>, but the position of the content is being pushed to the top.

What am I doing wrong here? Is it because the <div> doesn't have a set width and height?

Michael Kohne
  • 11,888
  • 3
  • 47
  • 79
Sam
  • 1,401
  • 3
  • 26
  • 53
  • Please post the relevant code, or a simulation. Eventually, if the link to your site changes or dies, then this question would lose value. Make the question complete. That said, here's some guidance for centering with flexbox: http://stackoverflow.com/a/33049198/3597276 – Michael Benjamin Jan 26 '16 at 18:29
  • Thanks for your input. I'll get a simulation running on here tomorrow. – Sam Jan 26 '16 at 18:45

1 Answers1

1

I don't know why the flexbox way doesn't work but you can do it with this code:

.center {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
ThemesCreator
  • 1,749
  • 6
  • 27
  • 49