No, that’s not what I meant. I don’t need to position an element in the center. I need to position it by the center.
For example, left positions using the left edge of the element. Right positions using the right edge of the element. Is there any CSS property to position it using the center of the element?
I was confused on which one to choose as solution, but I decided with yours. You were more accurate by transforming it by 50%. Though transform doesn’t work well sometimes, so I did calc(50% - elemsizedividedby2).