News for hackers. Stuff that matters.
Re:Only 90s Web Developers Remember This by err4nt on Tuesday February 25, 2014 @11:00PM (#7302802)
I do:

    .thing {
      position: relative;
    }
    .thing .child {
      width: 50px;
      height: 50px;
      position: absolute;
      top: 50%;
      margin-top: -25px; /* half of height */
    }
Or else if it's text I just make the line-height the same height as the parent element. That keeps things vertically centred :)

There are no comments on this comment yet.