@_oo_o___oo_

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

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

1Answer

Comments

  1. @_oo_o___oo_

    Questioner

    返信ありがとうございます。cssの書き方は合っていました。cssのファイルの読み込みの書き方が間違っていました。

Your answer might help someone💌