Hi there, I'm struggling with the CSS code below:
.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';
/*display : inline; tried this also and didn't work.*/
}
.child
{
color : '#123456';
font-size : '16px';
font-family : 'Arial';
vertical-align : 'middle';
}
I'm trying to center the child's content both horizontally and vertically within the parent div, but it seems to only align at the top of the parent element. Any suggestions on how to achieve this? Thank you.