0

I am trying to create right arrow with gray border with css. but I think the arrow is over lapping the left rectangle. some finishing touch is required here:

.arrow_box {
  position: relative;
  background: #fff;
  border: 2px solid #aaa;
  width: 300px;
  padding: 8px 20px 8px 40px;
}
.arrow_box:after,
.arrow_box:before {
  left: 100%;
  top: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}
.arrow_box:after {
  border-color: rgba(255, 255, 255, 0);
  border-left-color: #fff;
  border-width: 17px;
  margin-top: -17px;
}
.arrow_box:before {
  border-color: rgba(170, 170, 170, 0);
  border-left-color: #aaa;
  border-width: 19px;
  margin-top: -19px;
}
<div class="arrow_box"><a href="#">Consumer Customer</a>
</div>
Machavity
  • 30,841
  • 27
  • 92
  • 100
  • Remove the right border of the rectangle (`border-right: 0px;`). Is that what you need? Also have a look at this thread - http://stackoverflow.com/questions/27636373/how-to-make-this-arrow-in-css-only/28196665?s=22|0.0000#28196665. It might help you (based on the shape you're trying to create). – Harry Feb 19 '16 at 07:11
  • keep border radius 2px to 1px .arrow_box {border: 1px solid #aaa; } – Iqbal Pasha Feb 19 '16 at 07:26

1 Answers1

1

You can add border on specific sides except right:

.arrow_box {
position: relative;
background: #fff;
border-left: 2px solid #aaa;
border-top: 2px solid #aaa;
border-bottom: 2px solid #aaa;
width: 300px;
padding: 8px 20px 8px 40px;
box-sizing: border-box;
}

https://jsfiddle.net/2ca4aucm/1/

DebRaj
  • 599
  • 4
  • 16