I was asked to create this header using css only, is this possible?

The background of the text should remain transparent, h2 should cover the width of any container, and the left and right borders will automatically fill the remaining space.
h2 { font-size:42px; line-height:48px; width:100%; overflow: hidden; &:before { content:''; position:relative; padding-left:50px; padding-right:10px; margin-right:10px; margin-bottom:10px; background:red; height:3px; display:inline-block; } &:after { content:''; margin-left:10px; width:100%; background:red; height:3px; display:inline-block; } }
The left side is simple, however I am stuck on the right side.
https://jsfiddle.net/kab5qtbb/
I canβt understand how to make the right line, fill the remaining space to the right of the container.
html css css3 css-shapes
Shannon hochkins
source share