Saturday, December 9, 2017

Position absolute but relative to parent

Position absolute but relative to parent


#father {
   position: relative;
}

#son1 {
   position: absolute;
   top: 0;
}

#son2 {
   position: absolute;
   bottom: 0;
}

Reference:

https://stackoverflow.com/questions/10487292/position-absolute-but-relative-to-parent

No comments: