>How do you use contentEditable to resize div elements?
>That attribute allows the user to change what's in the div, not resize it.
You put a div tag around the div element that you want to edit.
<SCRIPT>
// Turn on 2D positioning
document.execCommand("2D-position",false,true);
</SCRIPT>
<DIV CONTENTEDITABLE="true">
<DIV style="width:300px;height:100px; background-color:red;
position:absolute;">
Movable DIV</DIV>
</DIV>
If the div isn't positioned absolutely, you can only change the size.
I read about that bit of code from the msdn site.
>I'd be curious to hear more about what you are trying to do.
Basically, I am trying to create a simple interface to use with an asp
image component that allows for cropping pictures. You will position a
div element over the area you wish to crop and the coordinates will be
posted to the aspimage page for processing. I have already done this,
but I was hoping to find a simpler solution.
Another issue with the resize ratio is when you resize pictures
dynamically in your page, they don't maintain the size ratio. I would
have thought that that would be a common function. I have not read
anything which documents a simple solution, hence my reason for
posting here.
Hope to talk to you again.
Jarrod