内部に「位置」スタイルとコンテンツを持つ div を中央に配置するにはどうすればよいですか? 私は次のコードを持っています:
<div class="block" id="block1" style="position:relative;">
<img />
<div id="temperature" style="position:absolute; top:50px; min-width: 400px; height: 300px; margin: 0 auto"></div>
<div id="tempeControl" style="position:absolute; bottom:0; ">
<button id="minus" style="height: 28px; width:128px;">-</button>
<span id="valueTempe" style="font-weight: bold; color: #fea100; width:28px;">0</span>
<button id="plus" style="height: 28px; width:128px;">+</button>
</div>
</div>
<center>
、 (同じだと思いtext-align:center
ます)、およびmargin-left:auto; margin-right:auto;