Just in case anyone wants to, IMHO the best solution using CSS is by a flexbox.
Here is an example:
.kw-dvp-HorizonalButton {_x000D_
color: #0078d7;_x000D_
display:flex;_x000D_
flex-wrap:nowrap;_x000D_
align-items:center;_x000D_
}_x000D_
.kw-dvp-HorizonalButton:before, .kw-dvp-HorizonalButton:after {_x000D_
background-color: #0078d7;_x000D_
content: "";_x000D_
display: inline-block;_x000D_
float:left;_x000D_
height:1px;_x000D_
}_x000D_
.kw-dvp-HorizonalButton:before {_x000D_
order:1;_x000D_
flex-grow:1;_x000D_
margin-right:8px;_x000D_
}_x000D_
.kw-dvp-HorizonalButton:after {_x000D_
order: 3;_x000D_
flex-grow: 1;_x000D_
margin-left: 8px;_x000D_
}_x000D_
.kw-dvp-HorizonalButton * {_x000D_
order: 2;_x000D_
}
_x000D_
<div class="kw-dvp-HorizonalButton">_x000D_
<span>hello</span>_x000D_
</div>
_x000D_
This should always result in a perfectly centered aligned content with a line to the left and right, with an easy to control margin between the line and your content.
It creates a line element before and after your top control and set them to order 1,3 in your flex container while setting your content as order 2 (go in the middle). giving the before/after a grow of 1 will make them consume the most vacant space equally while keeping your content centered.
Hope this helps!