0

I have a h2 element in HTML and I want to manipulate the ::before pseudo element position if the H2 aligned to center. I'm looking for something like this:

$(this + '::before').css({
    'left': ($(this).width() - x) / 2
});

Is there any working solution?

netdjw
  • 5,419
  • 21
  • 88
  • 162

0 Answers0