2012-05-11 25 views
1

非常に基本的なページを作成しました フィールドセットを水平方向に配置しようとしています。私はそれを<centre>の中にラップしようとしましたが、動作しませんでした。 どうすればよいですか?ここでJQMウェブサイトでフィールドセットを水平に配置する方法

は私のコードは

<div data-role="content"> 
    <div data-role="fieldcontain"> 
       //Its left align, how do i centre align 
       <fieldset data-role="controlgroup" data-type="horizontal"> 
         <input type="radio" name="radio-choice-b" id="radio-choice-c" value="on" checked="checked" /> 
         <label for="radio-choice-c">Recent</label> 
         <input type="radio" name="radio-choice-b" id="radio-choice-d" value="off" /> 
         <label for="radio-choice-d">Upcoming</label> 
       </fieldset> 
    </div>   
<ul data-role="listview"> 
     //my list      
    </ul> 
</div> 

答えて

0

である私の作品、私が見つけたトリックは、別のdivにフィールドセットをラップし、そのdivのインラインまたはCSSファイル内のいずれかで、次のCSSを置くことです。

display: table; 
margin: 0 auto; 

だから、

<div class='fieldset-center-wrapper'> 
    <fieldset> 
    your stuff here 
    </fieldset> 
</div> 
のようなもので終わるだろう
関連する問題