We’ve all seen
margin: 0 auto;
for horizontal centering, butmargin: auto;
has refused to work for vertical centering… until now! But actually (spoiler alert!)I’m not the pioneer of this method, and it may even be a common technique, however, most vertical centering articles never mention it and I had never seen it until I dug through the comments section of read more @ http://www.css-jquery-design.com/…
1. Absolute Center
.Absolute-Center {
margin: auto;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
}
ADVANTAGES:
- Cross-browser (including IE8-10)
- No special markup, minimal styles
- Responsive with percentages and min-/max-
- Use one class to center any content… read more @ http://www.css-jquery-design.com/…