Railsでformのtext_fieldのサイズを変える
formでtext_fieldのサイズを変えたいなぁと思ってごにょごにょしました。
text_field
http://railsdoc.com/references/text_field
text_area
http://railsdoc.com/references/text_area
bootstrap使ってる場合は、class="input-large"とか"input-xlarge"で大きくなる。
けど、大きさを調整したい!上記のやり方だと、横だけなので、縦も大きくしたい!と思っていじりました。
http://stackoverflow.com/questions/9784990/bootstrap-wider-input-field
こちらのclass="input-mysize"を作って、cssに
.input-mysize { width 440px; height 60px; }
とかしました。
bootstrapやbootswatchを使っていると、loader.cssとかで大きさが指定されていたりするので、その場合に縦変えたい場合は、
.input-mysize { width 440px; height 60px !important; }
するとoverrideして反映されます。
input-largeとかのクラスの設定を書き換えるやり方。
こっちは試してないです。