Jump to content

Create Crooked Container


Nikolas96

Recommended Posts

The only non rectangular container div shape you can create is a skewed div using transform: with skew(); a circular div using border-radius, nothing as complex as ellipse, star, polygon.

 

You can create these other shapes using svg to use as an overlay or underlay overlapping a normal div element.

 

A triangle can be created with borders using above method, but the drawback is it is not responsive as can only use a fixed width unit, not percentage.

Edited by dsonesuk
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...