0

I'm trying to resize a div element.

I managed to do it by using resize: css property like so:

http://codepen.io/bengedi/pen/GJMpPd

But it doesn't work with IE.

how can I make it work on IE10+ with css and/or js only (not jQuery).

DavidPostill
  • 7,734
  • 9
  • 41
  • 60
user3341337
  • 113
  • 6
  • What do you actually try to achieve? There's no resizeable elements in your codepen example when opened with FF. What does not work in IE? – Teemu Jun 20 '15 at 11:22

1 Answers1

0

CSS resize is not supported by IE. This is for reference:

http://www.w3schools.com/cssref/css3_pr_resize.asp

Can you please explain what actually you're looking for?

There are few way to resize element. Example:

Using CSS

.normal {
  width: 200px;
  height: 100px;
}
.normal.resized {
  width: 400px;
  height: 200px;
}

Using Javascript

Assume you have <div class="normal"></div>

var div = document.querySelectorAll('.normal');
div.style.width = 400;
div.style.height = 200;

Using CSS Transform

.normal {
  width: 200px;
  height: 100px;
}
.normal.scaled {
  transform: scale(1.2); // Scale 120%
}

If you try to ask "How to create cross browser resizable div?", you can check answered question: How to make HTML element resizable using pure javascript?

Community
  • 1
  • 1
  • Thanks for your reply, I'm trying to be able to resize some div when pressing on the bottom right corner of the current div, much like my codepen example: http://codepen.io/bengedi/pen/GJMpPd and doing it in javascript so it will work on IE10+. Thanks – user3341337 Jun 23 '15 at 11:11