Is there a way to center that pseudo element in regards to the width of <p>? The pseudo element should appeared centered under the text displayed in <p>.
I tried with position absolute, with a negative value for bottom (so far so good), but I can’t get things to get centered.
Yeah, I was going to suggest that, although it seemed to move the paragraph down a bit, so display: table seemed preferable here. (I probably should investigate why inline-block made the para jump down a bit, but I’m too lazy. )
It’s the top margin on the p element causing the difference as the table (display:table) collapses the margin but inline-block does not (because it creates a new block formatting context). If you set p margin:0 then both routines work the same or if you set html,body to margin:0 then they both behave the same.