When you declare "margin: 0 auto" you're explicitly giving instructions to not use margin on the top and bottom. If absolute positioning is acceptable, you can do:
margin:auto; position: absolute; top: 0; bottom:0; left:0 right:0; On Jun 3, 2015 7:46 PM, "Crest Christopher" <crestchristop...@gmail.com> wrote: > I've come across many pages how to center a item horizontally and > vertically, one method {margin: 0 auto;} works great, horizontally, not > vertically. I found another solution whereas, all I do is add > {top:50%;translateY(-50%);} to the child, that is not working either ? > > [Example <https://jsfiddle.net/WildWind/bs84tegs/>] > ______________________________________________________________________ > css-discuss [css-d@lists.css-discuss.org] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/