0
Rails에서 collection_select의 기본 너비를 설정해야합니다. 나는이 시도했지만 작동되지 않습니다 Rails에서 collection_select의 기본 너비 설정
<%= u.collection_select :program_id, Program.where(:status => true), :id, :name , :include_blank=> true, :class=>'foo'%>
도 해봤 : 어떤 아이디어를
<%= u.collection_select :program_id, Program.where(:status => true), :id, :name , :include_blank=> true, {:class=>'foo'}%>
<%= u.collection_select :program_id, Program.where(:status => true), :id, :name , :include_blank=> true, :style=>'width:50%'%>
그들은 작동하지 않았다?
''foo'' 클래스는 CSS 파일에서 어떻게 보입니까? – ScottJShea
@ScottJShea 클래스는 다음과 같이 보일 수 있습니다.'.foo { width : 23px; }' – Daisy