Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Put a line above text

Tags:

html

css

I'm trying to put a line over some text.

This is what I wantenter image description here

And this is what I got so far

enter image description here

this is the what I have in my application

<div class="zoekResultatLine">
    <h2 class="zoekResultat">ZOEKRESULTAAT</h2> 
</div>


.zoekResultatLine
{     
     text-decoration:overline;
     color : rgb(217, 217, 217);
}

.zoekResultat
{
    color : rgb(0, 158, 224);
}
like image 319
Rui Martins Avatar asked Mar 04 '26 16:03

Rui Martins


1 Answers

Give it a border-top and play with the padding-top to get it right:

.zoekResultatLine {
    border-top:1px solid rgb(217, 217, 217);
}
.zoekResultat {
    color : rgb(0, 158, 224);
    margin-top: 0px;
}

Fiddle

like image 186
putvande Avatar answered Mar 06 '26 07:03

putvande



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!