Operation as keep center element hide Showing soon elements
- December 21, 2020
- 1 reply
- 555 views
Hi, I have a square element box with a number in the center of the square, I want this number to always remain inside the height and width.
Just below the number (also inside the parent box), I have another responsive element box with five colored balls inside, in horizontal formation and stack property. Every time I show or hide one or more balls, the size of this last element (width) adjusts itself, by the stack / resize property.
The problem is: I want the element box of the balls to remain horizontally centered in relation to the square parent box and its brother the number. Currently, when the ball box is resized, it does so by remaining fixed to the right side, it does not remain atomatically centered.
Can anyone suggest or help how a position can be forced when an element changes size due to showing / hiding any of the components of an element? It is important to show or hide it, resizing with the mouse the largest element if it respects it , but hiding or showing the components of the ball box does not.
Can you put in the values of eg padding operators like 50% - "(x value)" px?
Thanks a lot.
