2011-09-16 5 views
2

DropDownListFor 내에서 데이터의 글꼴 크기를 설정하려고합니다. 그리드의 다른 모든 텍스트의 크기를 설정할 수 있지만 DropDownListFor 내부의 텍스트를 제어 할 수 없습니다.DropDownListFor에 대한 글꼴 크기 설정

<% foreach (var item in Model) { %> 
      <tr> 
       <td> 
        <%: Html.DropDownListFor(listitem => item.AttendStatusType, new SelectList((IEnumerable)ViewData["status"], "Value", "Text",item.AttendStatusType), new { @class="attendStatusList", id = "student" + item.Id + "attendStatus" })%> 
       </td> 
      </tr> 
     <% } %> 

나는 많은 변화를 시도했지만 아무런 차이가없는 것으로 보인다. 단순히 스타일 = 추가하여

<% foreach (var item in Model) { %> 
      <tr> 
       <td> 
        <%: Html.DropDownListFor(listitem => item.AttendStatusType, new SelectList((IEnumerable)ViewData["status"], "Value", "Text",item.AttendStatusType), new { @class="attendStatusList", id = "student" + item.Id + "attendStatus",style="font-size:90%;" })%> 
       </td> 
      </tr> 
     <% } %> 

:

답변

1

글쎄, 나는 마침내 그것을 수행하는 방법을 알아 냈어, 여기에 솔루션이었다 "글꼴 - 크기 : 90 %;" 그것은 효과가 있었다. Site.css 또는 div 래퍼를 사용하여 작업해야하지만 둘 다 작동하지 않아야합니다.