A transformable element is an element whose layout is governed by the CSS box model which is either a block-level or atomic inline-level element, or whose display property computes to table-row, table-row-group, table-header-group, table-footer-group, table-cell, or table-caption.
Therefore the display of the elements should be changed from inline
to inline-block
in order for skew()
to work. In addition, I added white-space: nowrap
in order to prevent the text from wrapping to a new line.
#nav ul li {
display: inline-block;
padding: 0 0 0 3.5%;
transform: skew(15deg);
-webkit-transform: skew(15deg);
white-space: nowrap;
}