Hi, I have the following CSS code:
.parent { position : 'absolute'; top : '50px'; left : '50px'; width : '400px'; height : '160px'; padding : '10px'; border : '2px solid'; border-color : '#444444'; background-color : '#FF0000'; text-align : 'center'; } .child { color : '#123456'; font-size : '16px'; font-family : 'Arial'; vertical-align : 'middle'; }
I just want to put the child content in the center (x and y) of the parent div, but it does not work, it only displays the text at the top of the parent element. Any suggestion? thanks.
source share