angular-centered

vertically and horizontally positioned overlay container directive
Homepage:
6 people use it

angular-centered

An angular directive for rendering a vertically and horizontally positioned overlay.

*You may adjust .angular-center-container (css) to make contents centered within another div instead of the whole screen.

fiddle : http://jsfiddle.net/vCL9P/2/

Usage :

HTML :

<centered> <h2>This text should be centered</h2> </centered>

CSS :

.angular-center-container { position: fixed; top:0; left:0; height:100%; width:100%; display:table; pointer-events: none; z-index:9999; } .angular-centered { display: table-cell; vertical-align: middle; text-align: center; }

comments powered by Disqus
This page was last updated almost 4 years ago.