2013-07-08 34 views
0

我正在實現一個頁面,我需要三個按鈕和一個文本框在同一水平面(同一行)。實施時,它會垂直出來。
我該如何解決這個問題?
這是my fiddle爲什麼按鈕和文本字段不顯示在同一行中?

我使用這個:

<div data-role="fieldcontain"> 

          <input name="text-12" id="text-12" value="" type="text" > 
           <a href="#" data-role="button" data-corners="false" >Search</a> 
           <a href="#" data-role="button" data-corners="false">Next</a> 
           <a href="#" data-role="button" data-corners="false" >Previous</a> 
</div> 

回答

0

您需要添加此

data-inline="true" 

那麼結果將是這

  <div data-role="fieldcontain"> 

         <input name="text-12" id="text-12" value="" type="text" > 
          <a href="#" data-role="button" data-corners="false" data-inline="true" >Search</a> 
         <a href="#" data-role="button" data-corners="false" data-inline="true">Next</a> 
          <a href="#" data-role="button" data-corners="false" data-inline="true" >Previous</a> 
        </div> 
<div data-role="content" data-theme="d"> 


      <div 

這可以在jQuery Mobile的文檔中找到這裏 http://jquerymobile.com/demos/1.2.1/docs/buttons/buttons-inline.html

+0

如何隱藏和顯示這個div點擊任何按鈕? – user2549922

+0

點擊任何按鈕,我需要顯示。任何點擊按鈕,我需要隱藏這 – user2549922

+0

不工作按鈕是水平計劃但下一個領域是在按鈕上方.. :( – user2549922

相關問題