html - CSS unable to un-skew text issue -


i attempting create skewed links straightened text. unable un-skew text despite ton of tinkering. here html code using:

<div class="menu">     <div class="row">         <div class="col-md-6">             <h1>photography</h1>         </div>         <div class="col-md-6">             <ul>                 <li class="skew"><a class="skew-fix">work</a></li>                 <li class="skew"><a class="skew-fix">shop</a></li>                 <li class="skew"><a class="skew-fix">contact</a></li>             </ul>         </div>     </div> </div> 

and here css:

.menu {     height: 90px;     border-bottom: 1px solid black;     padding: 0 50px; } .menu h1 {     line-height: 90px;     margin: 0; } .skew {     margin: 5px 0;     display: inline-block;     font-size: 25px;     padding: 0 18px;     float: right;     line-height: 80px;     transform: skewx(-20deg); } .skew-fix {     transform: skewx(20deg); } 

can identify doing wrong?

transform doesn't work on inline elements links.

make them inline-block or block

.menu {    height: 90px;    border-bottom: 1px solid black;    padding: 0 50px;  }  .menu h1 {    line-height: 90px;    margin: 0;  }  .skew {    margin: 5px 0;    display: inline-block;    font-size: 25px;    padding: 0 18px;    float: right;    line-height: 80px;    transform: skewx(-20deg);    background: pink;  }  .skew-fix {    transform: skewx(20deg);    display: block;  }
<div class="menu">    <div class="row">      <div class="col-md-6">        <h1>photography</h1>      </div>      <div class="col-md-6">        <ul>          <li class="skew"><a class="skew-fix">work</a>          </li>          <li class="skew"><a class="skew-fix">shop</a>          </li>          <li class="skew"><a class="skew-fix">contact</a>          </li>        </ul>      </div>    </div>  </div>


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -