Welcome to WebmasterWorld Guest from 54.211.136.250

Forum Moderators: not2easy

Message Too Old, No Replies

Resizeable DIV

Resize DIV with a handle in the corner

   
9:49 am on Aug 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Greetings

I am trying to create a resizeable div, where the client can expand the the DIV using a handle on the bottom right. I have most of the functionality in place using the struts2 - jquery plugin. The issue I have is the DIV has four corners 2 top and 2 on the bottom. Between this i have a repeating 1px matching colored background for the x & y (top, bottom, left & right axis).

<div id="parentDiv">
<div>
<div id="cornerTL"></div>
<div id="topBorder">
<div class="title">My Title</div>
</div>
<div id="cornerTR"></div>
</div>
<div style="clear:left">
<div id="leftBorder"></div>
<div id="body">My DIV content</div>
<div id="rightBorder"></div>
</div>
<div style="clear:left">
<div id="cornerBL"></div>
<div id="bottomBorder"></div>
<div id="cornerBR"></div>
</div>
</div>

So when parentDiv is expanded horizontally the top left and right corners keep their width but the topBorder expands its %, and when expanded vertically the left and right border % expands.
Ideally this solution will not have a fixed width x & y border image and just grow the 1px as required.

With thanks in advance

-Gs
2:15 pm on Aug 13, 2010 (gmt 0)



Hi, this may help you out:

[dynamicdrive.com ]

all the best, Vince