CSS に関する質問です。 現在、あるブラウザゲームを作っており、10マス✖️10マス、1セルにひらがな1文字ずつのボタンが入ったTable要素をデザインしています。 できる限り各セルウチの中央に、大きく文字を表示させたいと考え下記のようなCSSを指定してみているのですが、何故か文字がセル内右寄せになった上、右側が途切れてしまうというおかしな表示になってしまっています(スクリーンショットの通り)。 もしこの問題の原因・解決方法などご存知でしたら、ご教示いただければ幸いです。 ===対象のCSS=== body {background-color: #ffffff; background-image: repeating-linear-gradient(to bottom, #fffacd, #fffacd 50px, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 100px), repeating-linear-gradient(to right, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.10) 50px, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 100px); font-size: 18px; text-align: center;} ... div {background: white; border-radius: 9px; text-align: center;} /* ↓盤面のTable要素を囲んでいるDiv要素 */ #game-container {width: 100%; text-align: center; background: white; border-radius: 9px;} #game-menu {margin: 1rem 0; text-align: center;} label, select {font-size: 18px; text-align: center; background: white; border-radius: 9px;} button {font-size: 20px; font-weight: bold; text-align: center; padding: 0.5rem 1rem; background: white; color: black; border: 2px solid orange; border-radius: 10px; cursor: pointer;} /* ↓盤面本体のTable要素 */ #game-board {width: 320px; height: 320px; margin: 0 auto; border: 2px solid black; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); border-collapse: collapse; table-layout: fixed;} #game-board td {width: 32px; height: 32px; font-size: 30px; border: 1px solid black; background-color: white; cursor: pointer; box-sizing: border-box; text-align: center; vertical-align: center; padding: 0;} /* ↓盤面内、各TD要素内に入れる1文字ずつのButton要素 */ button.cell {width: 100%; height: 100%; font-size: 30px; line-height: 30px; cursor: pointer; background: white; border: none; display: inline-block; text-align: center; vertical-align: center;} ... ========== よろしくお願いします。
HTML、CSS