4 ms·
Sure, because "vertically centered" means relative to what?
by gedy 8y ago
Sure, because "vertically centered" means relative to what?
- deleted 8y ago[deleted]
- Dylan16807 8y agoI want the contents of my div to be centered inside my div. Just like <center> works, but vertically. You don't need <foo><bar>content</bar></foo> for horizontal centering. I consider it a layering violation to have to do that nesting.
- gedy 8y agoMaybe we are misunderstanding each other, but while you don't need an "extra" container, you do need a container with some known height to vertically center the content in: http://jsfiddle.net/c20gq4pz/ http://jsfiddle.net/c20gq4pz/