これらのボタンをすべて同じサイズにしようとしています.2つはテキストのために大きくなっています.
これはCSSを使用して可能ですか?
これが jQuery Mobile の質問である場合、このクラスを変更することでボタンのサイズを変更できます。
.ui-btn {
width: 200px !important;
}
!important
デフォルト値をオーバーライドする必要があるため、jQuery Mobile では必須です。
作業例: http://jsfiddle.net/Gajotres/NJ8q4/
タグボタンを使用しているため(前の質問からそうです)、カスタムIDまたはクラスを指定する必要があります。.ui-btn だけを変更すると、アプリ内のすべてのボタンが変更されます。最終的に、この CSS は次の HTML で動作します。
<a data-role="button" class="custom-btn">Level 5</a>
<a data-role="button" class="custom-btn">Level 4</a>
<a data-role="button" class="custom-btn">Level 3</a>
<a data-role="button" class="custom-btn">Level 2</a>
<a data-role="button" class="custom-btn">Level 1</a>
<a data-role="button" class="custom-btn">Stretch</a>
<a data-role="button" class="custom-btn">Warm up</a>
.custom-btn {
width: 200px !important;
}