2013-03-21 29 views
0

我正在使用jquery.ui.combify定位jquery-ui-combify

以下是我HTML文件:

<!DOCTYPE html> 
<html> 
    <head> 
     <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/base/jquery-ui.css" type="text/css" media="all" /> 
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> 
     <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script> 
     <link rel="stylesheet" type="text/css" href="jqgridcss/jquery.ui.combify.css" /> 
     <script type="text/javascript" src="jqgridjs/jquery.ui.combify.js"></script> 
    <script type="text/javascript"> 
     $(document).ready(function(){ 
      $("#MySelect").combify(); 
      $("#MySelect2").combify(); 
     }); 
    </script> 
    </head> 
    <select id="MySelect"> 
     <option>Some Option</option> 
     <option>Some Other Option</option> 
    </select> 
    <select id="MySelect2"> 
     <option>Some Option</option> 
     <option>Some Other Option</option> 
    </select> 
</html> 

我有兩個combo-boxes,我想在一個單一的線來表示,但我得到這個兩combo-boxes在不同的行。

這是怎麼combo-boxes應該出現:

select1

但他們的出現,如:

​​

因此,讓我知道,如果有一個解決方案。

在此先感謝..

回答

0

試試這個代碼....

<html> 
<body> 
    <table> 
    <tr> 
    <td><select id="MySelect"> 
      <option>Some Option</option> 
      <option>Some Other Option</option> 
     </select> 
    </td> 
    <td> 
    <select id="MySelect2"> 
      <option>Some Option</option> 
      <option>Some Other Option</option> 
     </select> 
    </td> 
    </tr> 
    </body> 
</html> 
+0

感謝您的回答的答案 – Bhushan 2013-03-22 04:05:50

1
#MySelect{float:left;} 
#MySelect2{float:left;} 

使用float:leftfloat:right

+0

感謝(和+1 ) – Bhushan 2013-03-22 04:05:04