I came across a solution here but it's not quite what I need for 2 reasons:
I don't know how to make the lines much shorter in width.
That solution defines H2, and I have already defined h2 in a current css I have on the website. I would prefer a unique css class as the definition so it doesn't clash. Thr following image shows what I'm trying to achieve. Basically, a h2 text in italic + 2 shorter horizontal lines on both sides, centered, like this Lines with text in the middle
I will appreciate any help at all. I will be using the code in Wordpress Thank you.