This feels a bit janky but it works. Uses a single element with :before
and :after
pseudo-elements to create the arrows. This demo uses a max-width
that can be changed depending on use. The height probably needs to stay fixed to work however.
Note: the chevron (white arrow) extends beyond the top/bottom of the bar and will overlap other elements, so you would need to wrap this element in another div with overflow: hidden
or make sure to space other elements so the overlap doesn't effect neighboring elements.
.chevronlabel {
background-color: #0099C3;
max-width: 200px;
height: 52px;
display: inline-block;
color: #ffffff;
box-sizing: border-box;
font-family: Arial;
padding: 8px 30px 8px 12px;
position: relative;
}
.chevronlabel:before {
content: '';
position: absolute;
right: -13px;
top: 0;
width: 0;
height: 0;
border-top: 26px solid transparent;
border-left: 13px solid #0099C3;
border-bottom: 26px solid transparent;
}
.chevronlabel:after {
border-style: solid;
border-color: #ffffff;
border-width: 15px 15px 0 0;
content: '';
display: inline-block;
height: 30px;
width: 30px;
position: absolute;
top: 50%;
right: -10px;
transform: rotate(-45deg);
vertical-align: top;
transform: rotate(45deg) skew(20deg, 20deg) translate(-50%);
}
<div class="chevronlabel">
Button Text and More Text
</div>