Answers for "align content of parent div center"

CSS
0

text-align:center apply to parent div or child div

.parent {
    width: 100%;
    border: 1px solid blue;
    text-align: center;
}

.child {
    display: inline-block;  
    border: 1px solid red;
    margin: 2px;
}
Posted by: Guest on October-20-2020

Code answers related to "align content of parent div center"

Browse Popular Code Answers by Language