Position children elements in the parent absolutely using CSS

1 · Amit Merchant · Aug. 29, 2021, 5:21 p.m.
Sometimes, it might be the case where you want to place/position the children elements that reside insides their parent absolutely. For instance, if you can notice on the homepage, the first article on the list is labeled as a “NEW” badge on it like so. Here, the new badge is an SVG icon that lies inside the parent box absolutely and so even though it’s a child of this parent div, I was able to place it outside of its edge. I’m going to explain how you can achieve this kind of behavior in this ...