How to vertically align into the center of the content of a div with defined width/height?
问题 What would be the correct method to vertically center any content in a defined width/height div . In the example there are two contents with different heights, what is the best way to center vertically both using the class .content . (and it works for every browser and without the solution of table-cell ) Have some solutions on mind, but would like to know other ideas, one is using position:absolute; top:0; bottom: 0; and margin auto . 回答1: I have researched this a little and from what I have