I think I have a solution for your question:
.divOuter {
background-color: #cccccc;
width: 100%;
height: 2px;
position: absolute;
}
.divInner {
background-color: #cc0000;
width: 130px;
height: 20px;
position: relative;
top: -12px;
margin: 0 auto;
color: #ffffff;
text-align: center;
font-family: Verdana;
font-size: 0.8em;
font-weight: bold;
border-radius: 10px;
border: 4px solid #ffffff;
}
<div class="divOuter">
<div class="divInner">FINAL HOURS!</div>
</div>
Brief explanation:
We have two divs, the second one in the html is on top of the first one. This placement in CSS is called a float.
When we need this effect we use the "position" property of the CSS with values like Absotule and Relative.
In this case, the first Div makes the thin line and the second Div makes the red rectangle.
The "top", "left", "right" and "button" property of the css causes to align the second Div relative to the first. And the property "margin: auto" causes the internal div to be aligned to the center of the external div.
I hope I've helped!