Responsive Elements makes it possible for any element to adapt and respond to the area they occupy. It's a tiny javascript library.
Website Demo