Center a div vertically
Use Cascading StyleSheets to center a child div within a container div
Given that you have a generic HTML page like this
Text
Inner Text
Inner Text
Now I want to hide the top div and then move the bottom div into the center of the container. This is a contrived example, but accomplishes the goal. Use the transform
directive of CSS to do it like so transform: translateY(-50%);
Text
Inner Text