0

I need a line with two color combinations. Can anyone help me make a line like the line in the attached image?

enter image description here

Please review the image I attached and help me as soon as possible.

Stickers
  • 75,527
  • 23
  • 147
  • 186
Arslan Ali
  • 77
  • 1
  • 10

2 Answers2

4

I suggest to use pseudo element to create the 2nd border, simple demo follows.

div {
  width: 200px;
  height: 20px;
  border-bottom: 1px solid black;
  position: relative;
}
div:after {
  position: absolute;
  bottom: 0; /* or -1px for covering it */
  left: 50px;
  width: 100px;
  content: '';
  border-bottom: 1px solid red;
  
}
<div></div>
Stickers
  • 75,527
  • 23
  • 147
  • 186
2

You can try something like this

div {
  width: 300px;
  height: 100px;
  border-bottom: 2px solid grey;
  position:relative;
}
div:after {
  position: absolute;
  content: "";
  width: 50%;
  height: 2px;
  background: orange;
  bottom: 0px;
  left: 50%;
  transform: translate(-50%, 0%)
<div></div>
Akshay
  • 14,138
  • 5
  • 46
  • 70