jQuery ui selectmenu vertical position offset (relatively to buttons in this line)

£可爱£侵袭症+ 提交于 2020-01-16 02:21:23

问题


In my form I place control elements in a line: button, select box, checkbox. It looks logically right. But since I've started using jQuery UI I see strange vertical of select box. Here's the example from jquery-ui site, a little bit shortened: https://jsfiddle.net/Tertium/z829pay7

  $(function() {
    $( "#speed" ).selectmenu( { width: 200});
    $( "#files" ).selectmenu({ width: 200});
    $( "#but1" ).button();
    $( "#but2" ).button();

    });

Tested on jquery 1.11.2 and 1.10.2, jquery-ui: 1.11.3, all settings/css by default. How I can show them in line or at least valigned by middle? Tried panning, margin, div, table - no effect at all.

And screenshot just in case:


回答1:


You can use vertical-align : middle;on your select-menu and button to align them vertically :

JSFIDDLE



来源:https://stackoverflow.com/questions/28784761/jquery-ui-selectmenu-vertical-position-offset-relatively-to-buttons-in-this-lin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!