You are viewing a single comment's thread from:

RE: What was the reason for the freeze?

in #steem6 years ago (edited)



The way this works is because if translate is used with a percentage value, its value is calculated based on the elements height/width on which it is applied on.

top, margin-left left and margin-top percentage values are calculated based on the parent element or in case the element has position: absolute applied to it based on the nearest parent with position: relative/absolute.

To center an element you just need to apply a value of 50% to either top, margin-left left or margin-top and a value of -50% to translate.

For left and margin-left you have to use translateX(-50%) and for the others translateY(-50%).

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 92256.59
ETH 3114.03
USDT 1.00
SBD 3.09