Without using pseudo-element
- Add
transform: skewXproperty to stretch the element on the
X axis.
- Problem !! Using this method involved that all childs elements will be
stretch too.
Using pseudo-element
- We first add
position: relativeto the element parent.
- We create our
::beforeelement in our CSS file.
- Now, you can start to stylized your
::beforeelement.
- Once your pseudo-element is correctly stylized you can simply add
transform: skewon him to stretch only this element.