I need help with CSS

I need a colleague to help me with the positioning of the container, because I created a block and activated a search loop, so that it returns a certain post and I need to display the highlighted image and then some information about that same post.

My problem is with the positioning of the container inside the block, because the positioning of the block I put as relative and the container as absolute, but the container is fixing to the left margin of the block and I need the container to always be in the horizontal center of the block .

I am very grateful for any colleague who can help me, because I am not able to solve this problem.


Just add 50% to left and then in the transform tab, under translateX add -50%

If that still seems to do nothing make sure the content has a width or that you align the stuff within the container.

This all might be possible without any absolute positioning, just regular flex stuff. Can’t really tell without seeing the actual site though.

thank you very much, it worked perfectly!