I am trying to create CSS that will achieve the following, where:
- The browser window
- Div which is absolute positioned as a footer on main browser window
- Child of (2), where text is vertically and horizontally centered inside it’s parent (2).
Logical flow is:
<DIV class="parent">
<DIV class="child">Some Text Centered</DIV>
</DIV>
Any help would be greatly appreciated. Thanks!
2
Answers
Use fixed positioning for parent, and make it a flex container to center its child.
if you are trying to center
.child
div withing.parent
you can do the following