CSSの文字配置について
CSSで文字をページの真ん中に配置したいのですが、指定通りに出来ないので教えて下さい。
CSSにてdivクラスの文字の配置を真ん中にしているのですが、左端によってしまいます。
どこが間違いか教えてください。
発生している問題・エラー
html
<body>
<div class="container">
<button id="cntUp">+1</button>
<button id="cntDown">-1</button>
<h1 id="currentCnt">0</h1>
<input id="reset" type="button" value="reset" />
</div>
<script src="app.js"></script>
</body>
css
.container {
text-align: center;
}
0 likes