-5

Im writing a website, im newbie. Needs help with header, i don`t know how to create line on either side of header. Here is image [1]: https://i.stack.imgur.com/X9b8I.jpg with that's what I mean.

1 Answers1

0

You can do it like below.

<style type="text/css">

a {
   width: 100%; 
   text-align: center; 
   border-bottom: 1px solid #000; 
   line-height: 0.1em;
   margin: 20px 0 20px;
   display: block;
} 

a span { 
    background: #000;
    padding: 10px 15px;
    color: white;
    margin-top: 5px;
}

</style>

<a><span>THIS IS A TEST</span></a>
Tec J
  • 108
  • 7