Contain Element

A JavaScript plugin to contain an element within its parent element.


The video in the background is the example.
Change the positioning below and resize your browser to compare.

top left
top center
top right

center left
center center
center right

bottom left
bottom center
bottom right

Video Credit ESO
Fork me on GitHub