Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
54
rated 0 times [  58] [ 4]  / answers: 1 / hits: 8468  / 3 Years ago, mon, july 19, 2021, 12:00:00

How can I draw a thin horizontal line without using the <hr> tag ?


I tried this:


.horizontal-line{
border-top: 1px solid #9E9E9E;
border-bottom: 1px solid #9E9E9E;
}

Although it works, I want this line to be thinner. I tried to reduce 1px to 0.5px, but it didn't work.


More From » html

 Answers
0

You can use it but there is not much difference.



.line {
display: inline-block;
width: 100%;
border-top: 0.2px solid red;
}

hr {
border-top: 0.2px solid red;
}

<div>
content
</div>
<span class='line'></span>
<div>
content
</div>
<hr>
<div>
content
</div>




[#1086] Sunday, July 11, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
keric

Total Points: 572
Total Questions: 93
Total Answers: 97

Location: Cyprus
Member since Mon, Oct 24, 2022
2 Years ago
;