Fluid Layout - Stop moving after certain x/y coordinate?

I have a fluid layout and I have buttons and things on the top right. When the person resizes the window down, they all jump on top of each other. How would I get them to stop after they get to the point of overlapping each other?

If you go here: http://www.ciriljazbec.com/

And go to their main page. When you resize your browser down, the elements stop at a certain point and just get cut off. How do I achieve this effect?

I’m thinking somewhere along the lines of using an enter_frame listener to detect the x and y coordinates of these elements, and when it hits a certain coordinate to remove the listener that moves these elements. Can someone point me in the right direction?