There is a much more lightweight solution.
- Take 50% of the outer element down from the top
- margin up 50% of these 50% to the inside element to get on the center of bottomline of the outer element (see fiddle below)
.wrapper {
position: absolute;
top: 50%; left: 50%;
}
img { /* or a container with img and p */
margin-top: -25%; margin-left: -50%;
}
Some text random size