Element with position absolute

How to handle the width of the element with position absolute according to the dynamic data coming through mapping of an array.

demo or any codepen link ?