Yes the element needs them set unless its a element with an image inside. Then you only need to set one and set the other to auto and the image must have at least one set and the other auto. That I have found. This code should absolute center the image inside the li.
.image-box { background-color: #0000FF; width: 20%; height: auto; top: 0; bottom: 0; left: 0; right: 0; margin: auto; position: absolute; display: table; } .image-box img { width: 100%; height: auto; } <li><div class="image-box"><img src="whathefont.jpg" /></div></li> Best, Karl DeSaulniers Design Drumm http://designdrumm.com On Mar 16, 2015, at 9:29 PM, Ryan Reese <sportsdude.re...@gmail.com> wrote: > That requires a width/height to get it working. Otherwise it will simply span > 100% width/height. I know of that method but centering a menu most definitely > needs to be in the document flow and is not really suitable for this case. > > There are other ways to center which I left out since it doesn't pertain to > the OPs issues. > > On Mon, Mar 16, 2015 at 10:27 PM, Karl DeSaulniers <k...@designdrumm.com> > wrote: > On Mar 16, 2015, at 7:43 PM, John <j...@coffeeonmars.com> wrote: > > >> On Mar 16, 2015, at 5:41 PM, Ryan Reese <sportsdude.re...@gmail.com> wrote: > >> > >> Text-align:center is a fine way to center list items. Noone will scorn > >> you or your centering method. I assume that the list items are > >> inline-block? inline? > >> > >> http://codepen.io/ryanreese09/pen/ZYmaxa > >> <http://codepen.io/ryanreese09/pen/ZYmaxa> > >> > >> That's the optimal way to center in this scenario. Obviously there are > >> more than one ways to center items but it just depends on your situation. > >> You can breathe easy. Text-align:center; is the easiest way to center > >> inline/inline-block elements. > > > > OK..thanks..heh..that answers and soothes my concern..thank you for that > > codepen, too. > > > > J > > You can also do the non-inline method. > > .Absolute-Center { > margin: auto; > position: absolute; > top: 0; > left: 0; > bottom: 0; > right: 0; > } > > Best, > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > ______________________________________________________________________ > 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/ > > > > -- > Ryan Reese ______________________________________________________________________ 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/