はブロック要素。
width:400px;を設定しないと、画面いっぱい(横幅)に広がっていく。
margin: 0 auto;をすることで、真ん中の位置にすることができる
.susumu {
width: 400px;
margin: 0 auto;
}
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme