make thw two consecutive <div> in the center of the container
问题 I have <div id="container"> <div id="div2">Title</div> <div id="div3">text text</div> </div> where #container { height:500px; width:100%; text-align: center; } #div2, #div3 { width: 50%; } is there anyway to make the both #div2 and div3 together at the center of the #container (horizontally and vertically) with their height being variable? 回答1: This is a hard question to answer because in all reality we have no idea what your width is going to even come close to looking like once you place