CSS: How to position a div in the center with dynamic width

Viewed 9986

I have a popup which is positioned in the center of the screen with: transform: translate(-50%, -50%); and position: absolute. Unfortunately for some reason my width is fixed and it is not dynamic ( based on the content ).

This is my jsfiddle: https://jsfiddle.net/qh13mnaf/1/

Why the width of the popup is not bigger?

1 Answers
Related