Bootstrap cartridge separator color change

I am using Bootstrap 3 and override .btn-primary

with the following css to change the color a little

.btn-primary {
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open>.dropdown-toggle.btn-primary {
    color: #fff;
    background-color: #286090;
    border-color: #204d74
}

      

I'm trying to use this example with breading , but when I do, the arrow points (triangle bits) that separate the elements are not the same color as the buttons. This happens in normal state as well as hover / active state.

What CSS properties do I need to change to make these triangles the same as my buttons?

.btn-primary {
  color: #fff;
  background-color: #337ab7;
  border-color: #2e6da4
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open>.dropdown-toggle.btn-primary {
  color: #fff;
  background-color: #286090;
  border-color: #204d74
}
.btn-breadcrumb .btn:not(:last-child):after {
  content: " ";
  display: block;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 10px solid white;
  position: absolute;
  top: 50%;
  margin-top: -17px;
  left: 100%;
  z-index: 3;
}
.btn-breadcrumb .btn:not(:last-child):before {
  content: " ";
  display: block;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 10px solid rgb(173, 173, 173);
  position: absolute;
  top: 50%;
  margin-top: -17px;
  margin-left: 1px;
  left: 100%;
  z-index: 3;
}
/** The Spacing **/

.btn-breadcrumb .btn {
  padding: 6px 12px 6px 24px;
  color: #fff;
}
.btn-breadcrumb .btn:first-child {
  padding: 6px 6px 6px 10px;
}
.btn-breadcrumb .btn:last-child {
  padding: 6px 18px 6px 24px;
}
/** Primary button **/

.btn-breadcrumb .btn.btn-primary:not(:last-child):after {
  border-left: 10px solid #428bca;
}
.btn-breadcrumb .btn.btn-primary:not(:last-child):before {
  border-left: 10px solid #357ebd;
}
.btn-breadcrumb .btn.btn-primary:hover:not(:last-child):after {
  border-left: 10px solid #3276b1;
}
.btn-breadcrumb .btn.btn-primary:hover:not(:last-child):before {
  border-left: 10px solid #285e8e;
}
      

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>


<div class="container">
  <div class="row">
    <h2>Breadcrumb Primary</h2>
    <div class="btn-group btn-breadcrumb">
      <a href="#" class="btn btn-primary"><i class="glyphicon glyphicon-home"></i></a>
      <a href="#" class="btn btn-primary">Snippets</a>
      <a href="#" class="btn btn-primary">Breadcrumbs</a>
      <a href="#" class="btn btn-primary">Primary</a>
    </div>
  </div>
</div>
      

Run codeHide result


+3


source to share


2 answers


This is the CSS to be used normally:

.btn-breadcrumb .btn.btn-primary:not(:last-child):after {
    border-left: 10px solid #327CBA;
}

      

This is the CSS to be used in hover mode:



.btn-breadcrumb .btn.btn-primary:hover:not(:last-child):after {
    border-left: 10px solid #286090;
}

      

Just look for the definitions in your CSS file and replace it with the code above.
You just need to change the colors for the normal state and the hover actually.

+4


source


Just remove all arrows



.btn.btn-primary:not(:last-child)::before,
.btn.btn-primary:not(:last-child)::after {
    content: none;
}

      

-1


source







All Articles