1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

bootstrapでcontainerの幅を変える方法

Posted at

結論

containerのstyleにmax-widthを設定する


<div class="container" style="max-width: 800px;">

このようにするとcontainerの幅の最大値を設定してをレスポンシブにデザインにすることができます。

余談

また、このようにすると幅が一定の値になるため、画面が小さくても同じ幅のままになります。


<div class="container" style="width: 800px;">

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?