Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Playing around with Drew Wilson's atvImg = 'AppleTV Image' Reply To: Playing around with Drew Wilson's atvImg = 'AppleTV Image'

#234693
michaellee
Participant

Hey @drone4four looking good so far.

So with the centerer, you’re missing the transform. The top and left will off set the element by 50% on both x and y axis. But you need to compensate for the width and height of the element. So you add in transform: translate(-50%, -50%); which will do just that.

If you’re not seeing the results, it may be because of missing vendor prefixes.

-webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);

One other observation that I made was that you put the “Enter” element into the header element. Any reason for this?