Home » Javascript » How Can i resize a div from all edges of a div instead of right bottom edge of div, in java script

How Can i resize a div from all edges of a div instead of right bottom edge of div, in java script

Posted by: admin June 30, 2018 Leave a comment

Questions:

Currently im using it like this and able to resize from right bottom edge

  <div style="padding-right:25px; height: 100%; width:100%" (dragover)="allowDrop($event)" (drop)="onDrop($event)">
    <div *ngFor="let widget of widgets" [id]="widget.id" class="test">
    </div>
  </div>

here is the css for resize

enter code here .test {
    position: absolute;
    z-index: 9;
    background-color: lightblue;
    text-align: center;
    border: 1px solid #d3d3d3;
    border: 2px solid;
    padding: 20px;
    width: 300px;
    resize: both;
    display: block;
    overflow: auto;
}
Answers: