Resize using alsoresize to only resize them in one direction.

Resize using alsoresize to only resize them in one direction.

Hi, I have a problem. I am using a Resize on a div. However, I use images inside the div to act like borders. So, when a resize occurs they don't resize too.

So, I  added the alsoresize feature. The problem now is that when I resize the div I do the same with the borders.
The problem is that I don't want to resize the borders. I  just want to for example resize the top and bottom borders to be resized only width wise.  The borders on the right and left side will only resize it's height. 

So, I want the borders to keep it's original size. Just resize only either the width or the height depending which border.

the borders on the top and bottom are going east and west. So, that's the width direction the x direction. So, if the width or the x direction of the div if it gets resize I want to also resize the top and bottom image borders to increase it's width by the same amount.  If the y direction increases or the height increases of the div. I then need to increase the height of the right and left image borders.  That way the borders stays as borders but the thickness of the borders doesn't change. 


So, I know I have to do an alsoresize for the resize. Since these images are inside this div and the div itself is the only one resizeable. If the div resizes I want it so that the images inside acting like custom borders to be resized too but they will only be resized in one direction.


top and buttom borders will increase or decrease only the  width and the right and left borders will only increase or decrease it's height. 

I also have another div that will resize exactly like the original div. So, the problem is that I need the alsoresize to not restrict that additional div and have that additional div resize exactly like the original div.
Just the images inside the original div to resize only one way. top and bottom only restrict increase and decreasing it's width. The right and left image borders to be restricted to only increase or decrease  it's height. 


how can I get this functionality? I assume that alsoresize automatically resizes that element based exactly on how the original div gets resize. I don't think I can restrict the also resize to only be width or just height for certain elements.