Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
jucasta738y.parent {
position: relative;
}
.child {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} -
Crost41088y.parent parent{
display whatever
}
.parent{
display table
}
.child{
display table cell
vertical align middle
} -
Xevion1578yWith flexbox it's 2 lines of css. Unless you need to support older browsers it's the way to go.
Related Rants
don't even start me on vertical-align
undefined
thinking outside of the box
css
awesome