0
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 5 years have passed since last update.

railsでbootstrap4を使用してるときの、フォームの横幅の指定

Last updated at Posted at 2018-12-29

テキストフィールドなどに、以下のように指定して、フォームの幅を変更できる

<%= f.text_field :title, class: 'form-control w-75 mx-auto'%>

w-75の部分は、w-25、w-50、w-75、w-100を使用可。
数字は幅の比率(%)

0
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
0
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?