I have created a multi coloured border but at the moment it appears in the top right instead of underneath my text. I want it to be underneath the text as like the text underline.
If I remove the float:right then it does go to the text, but appears either side of the text instead of underneath.
h1.title-v2.title-center, h2.title-v2.title-center, h3.title-v2.title-center {
text-align: center;
}
h2.title-v2 {
color: #555;
position: relative;
margin-bottom: 30px;
}
h1, h2, h3, h4, h5, h6 {
color: #555;
margin-top: 5px;
text-shadow: none;
font-weight: normal;
font-family: Roboto;
}
h2 {
font-size: 24px;
line-height: 33px;
}
h2.title-v2.title-center:before, [dir=rt1] h2.title-v2.title-center:after {
border-right: #F4A613 15px solid;
border-left: #B0c335 15px solid;
}
h2.title-v2:before {
left: 0;
width: 45px;
height: 4px;
content: " ";
bottom: -10px;
float: right;
background: #007DC5;
}
h2.title-v2.title-center:after, [dir=rt1] h2.title-v2.title-center:before {
left: 50%;
border-right: #56144A 15px solid;
border-left: #C62428 15px solid;
}
h2.title-v2:after {
left: 0px;
width: 29px;
height: 4px;
content: " ";
float: right;
}
<h2 class="title-v2 title-center">News</h2>