0

I've searched endlessly a way to control the length of each side of div in CSS. Just as you can control the color and width of each border. The aim is to create an irregular shape (Not square, not rectangle, perhaps a trapezium). I thought there could be something like

length-top:200px;
length-right: 150px;
length-bottom:300px;
length-left:100px;

If there's no way of doing that in CSS, what is the procedure to suggest augmentation of these properties?

landrykapela
  • 442
  • 6
  • 15

1 Answers1

0

You should try this..

div {    
  width:250px;
  height:100px;
  border:2px solid red;        
  margin-left:100px;
  margin-bottom: 0;
  margin-top: 5px;
}
.trapezium {
  margin-top: 0;
  border-top-width:4px;
  border-bottom-width:1px;
  -webkit-transform: perspective(150px) rotateX(40deg);    
}
<div class="trapezium"></div>
Mohit RaiYani
  • 236
  • 1
  • 6