2012-10-01 4 views
2

내 프로젝트에 jquery mobile을 사용하고 있습니다. 입력의 모든 라디오 버튼을 스타일로 자동 변환합니다. 주요 문제는 다른 상황에서 나는 다른 너비의 버튼이 있고 (사용자에 달려 있음) 매번 센터가 필요하다는 것입니다.입력 라디오 센터하는 법

buttons

각 버튼은 자신의 크기를 가지고 참조 (예를 들어 위 확대가 다른)로

<div data-role="fieldcontain" id="inline" > 
    <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true"> 
     {section name=i loop=$data['input'] start=0} 
      <input name="position" id="radio{$smarty.section.i.index}" value="{$data['input'][i]}" type="radio" /> 
      <label for="radio{$smarty.section.i.index}"> 
       {$data['input'][i]} 
      </label> 
     {/section} 
    </fieldset> 
</div> 
. 앞에서 말했듯이 각 사용자별로 어떤 버튼이 있는지 모르겠다 - 자신의 설정에 따라 다르므로 어떤 식 으로든 센터링하는 과정을 자동화해야합니다 - 몇 가지 아이디어가 있습니까?

+0

만약 블록이라면 css'margin-left : auto; margin-right : 자동'? [출처] (http://www.w3.org/Style/Examples/007/center.en.html) – Calavoow

+0

@Calavoow 시도, 운 없음. – NoNameZ

+1

[문서] (http://jquerymobile.com/test/docs/buttons/buttons-buttons-grouped.html)에서 설명한대로 ''대신 ''으로 시도해 볼 수 있습니다. 가능하다면 상태. – Calavoow

답변

0

상황에 따라 가능한 경우 대신 documentation으로 수행하여 으로 시도해 볼 수 있습니다.

관련 문제