How to make some text between two lines?

Issue

Hi I have some text and a line.

I need to make the picture look like this:

In my HTML code it looks like this:

<div class="container">
    <div class="line"></div> 
        <h2>Some Text!!!</h2>
    <div class="line"></div>
</div>

css:

.container {
    text-align: center; 
}

.line {
    height: 5px;
    background: #FFEE90;
}

What should I write to place my text between the lines?

Solution

Try this (using one line and relative position on h2 element):

jsfiddle.net/td8L8/

Answered By – luke

Answer Checked By – Dawn Plyler (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.