In the codepend example below, I created a header component similar to this Line-On-Sides Header post from CSS-Tricks but by using flexbox. You should also check out the comments in that post for a variety of ways to approach the design. Flexbox is, by far, the simplest in terms of code needed.
No matter how the positioning is done. The most efficient way to draw the lines is utilizing the
:after pseudo-elements of the header container.