0

This is the html part :

<div class="sama_productblocks_grid">
    <div class="title-bar">
        <h3>Nieuwste producten</h3>
    </div>
.....
</div>

This is the css

 .sama_productblocks_grid .title-bar h3 {
     margin: 0;
     position: relative;z-index: 3;
     font-size:18px;
     display: inline-block;
     color: #6D6C6C;
     font-weight: 400;
     text-transform: uppercase;
     font-family: "Open Sans",sans-serif !important;
     padding: 0px 65px;
}
/*newest product*/
.title-bar{
    position: absolute;
    overflow: hidden;
    margin-bottom: 10px;
    text-align: center;
    border-bottom:3px solid black;
    z-index: 3;
    width:100%;
    margin-bottom: 10px;
}
.sama_productblocks_descrition {margin-top:40px;}

What i want to achieve is to put a line before and after the text: Nieuwste producten. So I want to look like this: ----------- Nieuwste producten ------------

mtszkw
  • 2,717
  • 2
  • 17
  • 31
Attila Naghi
  • 229
  • 1
  • 8

2 Answers2

0

Do you mean something like this:

h3:before {
    content: "---------------- "
}
h3:after {
    content: " ----------------"
}
ArBro
  • 731
  • 5
  • 18
0

Is this what you are looking for?

body {
    margin-top: 50px;
}

.hr-div {
    height: 1px; 
    background-color: #e6e6e7; 
    text-align: center;  
    margin: 10px 0 10px -10px;
}
.hr-span {
    background-color: white; 
    position: relative; 
    top: -10px; 
    padding:0 10px; 
}
<div class="hr-div">
    <span class="hr-span">Your Title Here</span>
</div>
Razvan B.
  • 6,721
  • 2
  • 19
  • 32