Skew only one side of before & after to get flat-arrow












1















I've created some dummy breadcrumb-steps.
The 1st breadcrumb-step need to have a normal flat border on the left, which is done.
And on hover, I need to show the black border for each breadcrumb item.



But the only problem is on hover, for the 1st breadcrumb-step, I don't get that flat border on the left as expected.



Here's what is expected on hover:



enter image description here



Here's my code:






body {
padding: 0;
margin: 0;
}

.breadcrumbs {
background-color: white;
width: 100%;
padding: 0 1rem;
font-size: 0;
margin: 1rem;
}

.breadcrumbs .breadcrumb-step {
display: inline-block;
width: 12.33%;
height: 5rem;
text-decoration: none;
color: black;
}

.step-title {
display: none;
}

.breadcrumb-step:before {
content: '';
display: block;
transform: skew(30deg);
border: 1px solid lightgrey;
border-bottom: none;
height: 50%;
width: 100%;
}

.breadcrumb-step:after {
content: '';
display: block;
transform: skew(-30deg);
border: 1px solid lightgrey;
border-top: none;
height: 50%;
width: 100%;
}

.breadcrumb-step:hover:before {
border-color: black;
}

.breadcrumb-step:hover:after {
border-color: black;
}

.breadcrumb-step:nth-child(1):before {
transform: none;
border-right: none;
}
.breadcrumb-step:nth-child(1):after {
transform: none;
border-right: none;
}

.breadcrumb-step:nth-child(1):hover:before {
transform: skew(30deg);
border-right: 1px solid black;
}

.breadcrumb-step:nth-child(1):hover:after {
transform: skew(-30deg);
border-right: 1px solid black;
}
/*
.breadcrumb-step:nth-child(1) {
border: 1px solid lightgrey;
}

.breadcrumb-step:nth-child(1):before {
transform: none;
border: none;
}

.breadcrumb-step:nth-child(1):after {
transform: none;
border: none;
}
*/

<div class="breadcrumbs">
<a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
<a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
<a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
</div>












share|improve this question





























    1















    I've created some dummy breadcrumb-steps.
    The 1st breadcrumb-step need to have a normal flat border on the left, which is done.
    And on hover, I need to show the black border for each breadcrumb item.



    But the only problem is on hover, for the 1st breadcrumb-step, I don't get that flat border on the left as expected.



    Here's what is expected on hover:



    enter image description here



    Here's my code:






    body {
    padding: 0;
    margin: 0;
    }

    .breadcrumbs {
    background-color: white;
    width: 100%;
    padding: 0 1rem;
    font-size: 0;
    margin: 1rem;
    }

    .breadcrumbs .breadcrumb-step {
    display: inline-block;
    width: 12.33%;
    height: 5rem;
    text-decoration: none;
    color: black;
    }

    .step-title {
    display: none;
    }

    .breadcrumb-step:before {
    content: '';
    display: block;
    transform: skew(30deg);
    border: 1px solid lightgrey;
    border-bottom: none;
    height: 50%;
    width: 100%;
    }

    .breadcrumb-step:after {
    content: '';
    display: block;
    transform: skew(-30deg);
    border: 1px solid lightgrey;
    border-top: none;
    height: 50%;
    width: 100%;
    }

    .breadcrumb-step:hover:before {
    border-color: black;
    }

    .breadcrumb-step:hover:after {
    border-color: black;
    }

    .breadcrumb-step:nth-child(1):before {
    transform: none;
    border-right: none;
    }
    .breadcrumb-step:nth-child(1):after {
    transform: none;
    border-right: none;
    }

    .breadcrumb-step:nth-child(1):hover:before {
    transform: skew(30deg);
    border-right: 1px solid black;
    }

    .breadcrumb-step:nth-child(1):hover:after {
    transform: skew(-30deg);
    border-right: 1px solid black;
    }
    /*
    .breadcrumb-step:nth-child(1) {
    border: 1px solid lightgrey;
    }

    .breadcrumb-step:nth-child(1):before {
    transform: none;
    border: none;
    }

    .breadcrumb-step:nth-child(1):after {
    transform: none;
    border: none;
    }
    */

    <div class="breadcrumbs">
    <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
    <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
    <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
    </div>












    share|improve this question



























      1












      1








      1








      I've created some dummy breadcrumb-steps.
      The 1st breadcrumb-step need to have a normal flat border on the left, which is done.
      And on hover, I need to show the black border for each breadcrumb item.



      But the only problem is on hover, for the 1st breadcrumb-step, I don't get that flat border on the left as expected.



      Here's what is expected on hover:



      enter image description here



      Here's my code:






      body {
      padding: 0;
      margin: 0;
      }

      .breadcrumbs {
      background-color: white;
      width: 100%;
      padding: 0 1rem;
      font-size: 0;
      margin: 1rem;
      }

      .breadcrumbs .breadcrumb-step {
      display: inline-block;
      width: 12.33%;
      height: 5rem;
      text-decoration: none;
      color: black;
      }

      .step-title {
      display: none;
      }

      .breadcrumb-step:before {
      content: '';
      display: block;
      transform: skew(30deg);
      border: 1px solid lightgrey;
      border-bottom: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:after {
      content: '';
      display: block;
      transform: skew(-30deg);
      border: 1px solid lightgrey;
      border-top: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:hover:before {
      border-color: black;
      }

      .breadcrumb-step:hover:after {
      border-color: black;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border-right: none;
      }
      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border-right: none;
      }

      .breadcrumb-step:nth-child(1):hover:before {
      transform: skew(30deg);
      border-right: 1px solid black;
      }

      .breadcrumb-step:nth-child(1):hover:after {
      transform: skew(-30deg);
      border-right: 1px solid black;
      }
      /*
      .breadcrumb-step:nth-child(1) {
      border: 1px solid lightgrey;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border: none;
      }

      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border: none;
      }
      */

      <div class="breadcrumbs">
      <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
      </div>












      share|improve this question
















      I've created some dummy breadcrumb-steps.
      The 1st breadcrumb-step need to have a normal flat border on the left, which is done.
      And on hover, I need to show the black border for each breadcrumb item.



      But the only problem is on hover, for the 1st breadcrumb-step, I don't get that flat border on the left as expected.



      Here's what is expected on hover:



      enter image description here



      Here's my code:






      body {
      padding: 0;
      margin: 0;
      }

      .breadcrumbs {
      background-color: white;
      width: 100%;
      padding: 0 1rem;
      font-size: 0;
      margin: 1rem;
      }

      .breadcrumbs .breadcrumb-step {
      display: inline-block;
      width: 12.33%;
      height: 5rem;
      text-decoration: none;
      color: black;
      }

      .step-title {
      display: none;
      }

      .breadcrumb-step:before {
      content: '';
      display: block;
      transform: skew(30deg);
      border: 1px solid lightgrey;
      border-bottom: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:after {
      content: '';
      display: block;
      transform: skew(-30deg);
      border: 1px solid lightgrey;
      border-top: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:hover:before {
      border-color: black;
      }

      .breadcrumb-step:hover:after {
      border-color: black;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border-right: none;
      }
      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border-right: none;
      }

      .breadcrumb-step:nth-child(1):hover:before {
      transform: skew(30deg);
      border-right: 1px solid black;
      }

      .breadcrumb-step:nth-child(1):hover:after {
      transform: skew(-30deg);
      border-right: 1px solid black;
      }
      /*
      .breadcrumb-step:nth-child(1) {
      border: 1px solid lightgrey;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border: none;
      }

      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border: none;
      }
      */

      <div class="breadcrumbs">
      <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
      </div>








      body {
      padding: 0;
      margin: 0;
      }

      .breadcrumbs {
      background-color: white;
      width: 100%;
      padding: 0 1rem;
      font-size: 0;
      margin: 1rem;
      }

      .breadcrumbs .breadcrumb-step {
      display: inline-block;
      width: 12.33%;
      height: 5rem;
      text-decoration: none;
      color: black;
      }

      .step-title {
      display: none;
      }

      .breadcrumb-step:before {
      content: '';
      display: block;
      transform: skew(30deg);
      border: 1px solid lightgrey;
      border-bottom: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:after {
      content: '';
      display: block;
      transform: skew(-30deg);
      border: 1px solid lightgrey;
      border-top: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:hover:before {
      border-color: black;
      }

      .breadcrumb-step:hover:after {
      border-color: black;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border-right: none;
      }
      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border-right: none;
      }

      .breadcrumb-step:nth-child(1):hover:before {
      transform: skew(30deg);
      border-right: 1px solid black;
      }

      .breadcrumb-step:nth-child(1):hover:after {
      transform: skew(-30deg);
      border-right: 1px solid black;
      }
      /*
      .breadcrumb-step:nth-child(1) {
      border: 1px solid lightgrey;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border: none;
      }

      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border: none;
      }
      */

      <div class="breadcrumbs">
      <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
      </div>





      body {
      padding: 0;
      margin: 0;
      }

      .breadcrumbs {
      background-color: white;
      width: 100%;
      padding: 0 1rem;
      font-size: 0;
      margin: 1rem;
      }

      .breadcrumbs .breadcrumb-step {
      display: inline-block;
      width: 12.33%;
      height: 5rem;
      text-decoration: none;
      color: black;
      }

      .step-title {
      display: none;
      }

      .breadcrumb-step:before {
      content: '';
      display: block;
      transform: skew(30deg);
      border: 1px solid lightgrey;
      border-bottom: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:after {
      content: '';
      display: block;
      transform: skew(-30deg);
      border: 1px solid lightgrey;
      border-top: none;
      height: 50%;
      width: 100%;
      }

      .breadcrumb-step:hover:before {
      border-color: black;
      }

      .breadcrumb-step:hover:after {
      border-color: black;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border-right: none;
      }
      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border-right: none;
      }

      .breadcrumb-step:nth-child(1):hover:before {
      transform: skew(30deg);
      border-right: 1px solid black;
      }

      .breadcrumb-step:nth-child(1):hover:after {
      transform: skew(-30deg);
      border-right: 1px solid black;
      }
      /*
      .breadcrumb-step:nth-child(1) {
      border: 1px solid lightgrey;
      }

      .breadcrumb-step:nth-child(1):before {
      transform: none;
      border: none;
      }

      .breadcrumb-step:nth-child(1):after {
      transform: none;
      border: none;
      }
      */

      <div class="breadcrumbs">
      <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
      <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
      </div>






      html css css3 css-transforms






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 2 at 18:33









      BoltClock

      528k13011681204




      528k13011681204










      asked Jan 2 at 14:28









      SunnySunny

      245319




      245319
























          1 Answer
          1






          active

          oldest

          votes


















          4














          You can adjust the transform-origin then hide the overflowing part of the skewed element and change the left border of the first child on hover:






          body {
          margin: 0;
          }

          .breadcrumbs {
          background-color: white;
          width: 100%;
          padding: 0 1rem;
          font-size: 0;
          margin: 1rem;
          }

          .breadcrumbs .breadcrumb-step {
          display: inline-block;
          width: 12.33%;
          height: 5rem;
          text-decoration: none;
          color: black;
          }
          /*added this*/
          .breadcrumbs .breadcrumb-step:first-child {
          width: 15.33%;
          overflow:hidden;
          border-left:1px solid lightgrey;
          }
          /**/

          .step-title {
          display: none;
          }

          .breadcrumb-step:before,
          .breadcrumb-step:after {
          content: '';
          display: block;
          height: 50%;
          box-sizing:border-box;
          width: 100%;
          border: 1px solid lightgrey;

          }
          .breadcrumb-step:before {
          transform: skew(30deg);
          transform-origin:right bottom; /*added this*/
          border-bottom: none;
          }

          .breadcrumb-step:after {
          transform: skew(-30deg);
          transform-origin:right top; /*added this*/
          border-top: none;
          }

          /*added this*/
          .breadcrumb-step:hover:before,
          .breadcrumb-step:hover:after,
          .breadcrumbs .breadcrumb-step:first-child:hover{
          border-color: black;
          }

          <div class="breadcrumbs">
          <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
          </div>








          share|improve this answer





















          • 1





            Clever. Well done.

            – Diodeus - James MacFarlane
            Jan 2 at 14:42











          • Perfect! Great solution..thank you so much!

            – Sunny
            Jan 2 at 14:45











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008105%2fskew-only-one-side-of-before-after-to-get-flat-arrow%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          You can adjust the transform-origin then hide the overflowing part of the skewed element and change the left border of the first child on hover:






          body {
          margin: 0;
          }

          .breadcrumbs {
          background-color: white;
          width: 100%;
          padding: 0 1rem;
          font-size: 0;
          margin: 1rem;
          }

          .breadcrumbs .breadcrumb-step {
          display: inline-block;
          width: 12.33%;
          height: 5rem;
          text-decoration: none;
          color: black;
          }
          /*added this*/
          .breadcrumbs .breadcrumb-step:first-child {
          width: 15.33%;
          overflow:hidden;
          border-left:1px solid lightgrey;
          }
          /**/

          .step-title {
          display: none;
          }

          .breadcrumb-step:before,
          .breadcrumb-step:after {
          content: '';
          display: block;
          height: 50%;
          box-sizing:border-box;
          width: 100%;
          border: 1px solid lightgrey;

          }
          .breadcrumb-step:before {
          transform: skew(30deg);
          transform-origin:right bottom; /*added this*/
          border-bottom: none;
          }

          .breadcrumb-step:after {
          transform: skew(-30deg);
          transform-origin:right top; /*added this*/
          border-top: none;
          }

          /*added this*/
          .breadcrumb-step:hover:before,
          .breadcrumb-step:hover:after,
          .breadcrumbs .breadcrumb-step:first-child:hover{
          border-color: black;
          }

          <div class="breadcrumbs">
          <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
          </div>








          share|improve this answer





















          • 1





            Clever. Well done.

            – Diodeus - James MacFarlane
            Jan 2 at 14:42











          • Perfect! Great solution..thank you so much!

            – Sunny
            Jan 2 at 14:45
















          4














          You can adjust the transform-origin then hide the overflowing part of the skewed element and change the left border of the first child on hover:






          body {
          margin: 0;
          }

          .breadcrumbs {
          background-color: white;
          width: 100%;
          padding: 0 1rem;
          font-size: 0;
          margin: 1rem;
          }

          .breadcrumbs .breadcrumb-step {
          display: inline-block;
          width: 12.33%;
          height: 5rem;
          text-decoration: none;
          color: black;
          }
          /*added this*/
          .breadcrumbs .breadcrumb-step:first-child {
          width: 15.33%;
          overflow:hidden;
          border-left:1px solid lightgrey;
          }
          /**/

          .step-title {
          display: none;
          }

          .breadcrumb-step:before,
          .breadcrumb-step:after {
          content: '';
          display: block;
          height: 50%;
          box-sizing:border-box;
          width: 100%;
          border: 1px solid lightgrey;

          }
          .breadcrumb-step:before {
          transform: skew(30deg);
          transform-origin:right bottom; /*added this*/
          border-bottom: none;
          }

          .breadcrumb-step:after {
          transform: skew(-30deg);
          transform-origin:right top; /*added this*/
          border-top: none;
          }

          /*added this*/
          .breadcrumb-step:hover:before,
          .breadcrumb-step:hover:after,
          .breadcrumbs .breadcrumb-step:first-child:hover{
          border-color: black;
          }

          <div class="breadcrumbs">
          <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
          </div>








          share|improve this answer





















          • 1





            Clever. Well done.

            – Diodeus - James MacFarlane
            Jan 2 at 14:42











          • Perfect! Great solution..thank you so much!

            – Sunny
            Jan 2 at 14:45














          4












          4








          4







          You can adjust the transform-origin then hide the overflowing part of the skewed element and change the left border of the first child on hover:






          body {
          margin: 0;
          }

          .breadcrumbs {
          background-color: white;
          width: 100%;
          padding: 0 1rem;
          font-size: 0;
          margin: 1rem;
          }

          .breadcrumbs .breadcrumb-step {
          display: inline-block;
          width: 12.33%;
          height: 5rem;
          text-decoration: none;
          color: black;
          }
          /*added this*/
          .breadcrumbs .breadcrumb-step:first-child {
          width: 15.33%;
          overflow:hidden;
          border-left:1px solid lightgrey;
          }
          /**/

          .step-title {
          display: none;
          }

          .breadcrumb-step:before,
          .breadcrumb-step:after {
          content: '';
          display: block;
          height: 50%;
          box-sizing:border-box;
          width: 100%;
          border: 1px solid lightgrey;

          }
          .breadcrumb-step:before {
          transform: skew(30deg);
          transform-origin:right bottom; /*added this*/
          border-bottom: none;
          }

          .breadcrumb-step:after {
          transform: skew(-30deg);
          transform-origin:right top; /*added this*/
          border-top: none;
          }

          /*added this*/
          .breadcrumb-step:hover:before,
          .breadcrumb-step:hover:after,
          .breadcrumbs .breadcrumb-step:first-child:hover{
          border-color: black;
          }

          <div class="breadcrumbs">
          <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
          </div>








          share|improve this answer















          You can adjust the transform-origin then hide the overflowing part of the skewed element and change the left border of the first child on hover:






          body {
          margin: 0;
          }

          .breadcrumbs {
          background-color: white;
          width: 100%;
          padding: 0 1rem;
          font-size: 0;
          margin: 1rem;
          }

          .breadcrumbs .breadcrumb-step {
          display: inline-block;
          width: 12.33%;
          height: 5rem;
          text-decoration: none;
          color: black;
          }
          /*added this*/
          .breadcrumbs .breadcrumb-step:first-child {
          width: 15.33%;
          overflow:hidden;
          border-left:1px solid lightgrey;
          }
          /**/

          .step-title {
          display: none;
          }

          .breadcrumb-step:before,
          .breadcrumb-step:after {
          content: '';
          display: block;
          height: 50%;
          box-sizing:border-box;
          width: 100%;
          border: 1px solid lightgrey;

          }
          .breadcrumb-step:before {
          transform: skew(30deg);
          transform-origin:right bottom; /*added this*/
          border-bottom: none;
          }

          .breadcrumb-step:after {
          transform: skew(-30deg);
          transform-origin:right top; /*added this*/
          border-top: none;
          }

          /*added this*/
          .breadcrumb-step:hover:before,
          .breadcrumb-step:hover:after,
          .breadcrumbs .breadcrumb-step:first-child:hover{
          border-color: black;
          }

          <div class="breadcrumbs">
          <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
          </div>








          body {
          margin: 0;
          }

          .breadcrumbs {
          background-color: white;
          width: 100%;
          padding: 0 1rem;
          font-size: 0;
          margin: 1rem;
          }

          .breadcrumbs .breadcrumb-step {
          display: inline-block;
          width: 12.33%;
          height: 5rem;
          text-decoration: none;
          color: black;
          }
          /*added this*/
          .breadcrumbs .breadcrumb-step:first-child {
          width: 15.33%;
          overflow:hidden;
          border-left:1px solid lightgrey;
          }
          /**/

          .step-title {
          display: none;
          }

          .breadcrumb-step:before,
          .breadcrumb-step:after {
          content: '';
          display: block;
          height: 50%;
          box-sizing:border-box;
          width: 100%;
          border: 1px solid lightgrey;

          }
          .breadcrumb-step:before {
          transform: skew(30deg);
          transform-origin:right bottom; /*added this*/
          border-bottom: none;
          }

          .breadcrumb-step:after {
          transform: skew(-30deg);
          transform-origin:right top; /*added this*/
          border-top: none;
          }

          /*added this*/
          .breadcrumb-step:hover:before,
          .breadcrumb-step:hover:after,
          .breadcrumbs .breadcrumb-step:first-child:hover{
          border-color: black;
          }

          <div class="breadcrumbs">
          <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
          </div>





          body {
          margin: 0;
          }

          .breadcrumbs {
          background-color: white;
          width: 100%;
          padding: 0 1rem;
          font-size: 0;
          margin: 1rem;
          }

          .breadcrumbs .breadcrumb-step {
          display: inline-block;
          width: 12.33%;
          height: 5rem;
          text-decoration: none;
          color: black;
          }
          /*added this*/
          .breadcrumbs .breadcrumb-step:first-child {
          width: 15.33%;
          overflow:hidden;
          border-left:1px solid lightgrey;
          }
          /**/

          .step-title {
          display: none;
          }

          .breadcrumb-step:before,
          .breadcrumb-step:after {
          content: '';
          display: block;
          height: 50%;
          box-sizing:border-box;
          width: 100%;
          border: 1px solid lightgrey;

          }
          .breadcrumb-step:before {
          transform: skew(30deg);
          transform-origin:right bottom; /*added this*/
          border-bottom: none;
          }

          .breadcrumb-step:after {
          transform: skew(-30deg);
          transform-origin:right top; /*added this*/
          border-top: none;
          }

          /*added this*/
          .breadcrumb-step:hover:before,
          .breadcrumb-step:hover:after,
          .breadcrumbs .breadcrumb-step:first-child:hover{
          border-color: black;
          }

          <div class="breadcrumbs">
          <a class="breadcrumb-step" href="#"><span class="step-title">Home</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">About</span></a>
          <a class="breadcrumb-step" href="#"><span class="step-title">Contact Us</span></a>
          </div>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 2 at 14:42

























          answered Jan 2 at 14:39









          Temani AfifTemani Afif

          80.4k94692




          80.4k94692








          • 1





            Clever. Well done.

            – Diodeus - James MacFarlane
            Jan 2 at 14:42











          • Perfect! Great solution..thank you so much!

            – Sunny
            Jan 2 at 14:45














          • 1





            Clever. Well done.

            – Diodeus - James MacFarlane
            Jan 2 at 14:42











          • Perfect! Great solution..thank you so much!

            – Sunny
            Jan 2 at 14:45








          1




          1





          Clever. Well done.

          – Diodeus - James MacFarlane
          Jan 2 at 14:42





          Clever. Well done.

          – Diodeus - James MacFarlane
          Jan 2 at 14:42













          Perfect! Great solution..thank you so much!

          – Sunny
          Jan 2 at 14:45





          Perfect! Great solution..thank you so much!

          – Sunny
          Jan 2 at 14:45




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008105%2fskew-only-one-side-of-before-after-to-get-flat-arrow%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith