Resizeable detect the resize direction.

Resizeable detect the resize direction.

Hi, I need to know how to determine the  direction the resize is occurring.

if it's going in the x direction.  meaning west and east and if it is going to the North and South direction to detect the directions.

I have 4 custom images. I have them inside a div and when this div resizes I need to be able to keep the borders to be the same thickness and cover the div. I wan to keep it like a border around the div. So, if the div resizes currently the borders don't grow or resize with the div and yes I have made it the alsoresize so it will resize just like the div but the problem is that the border gets thicker.

So, for example top border and bottom border going west and east. the resize would change this border's size going in the north south direction. 

I just want to have a div that I used images as the div's borders that when the div resizes the borders will keep the same ratio and will resize but not change at all and be the same exact size as it was before the resize and it will be in the same position meaning the borders will still go around the div and not get out of line.