开发者

How to make height of jquery ui autocomplete and button the same?

I use default jquery's ui autocomplete and button 开发者_高级运维and their height is different:

How to make height of jquery ui autocomplete and button the same?


Overriding the button padding with:

CSS

input.ui-button {
    padding-top:0;
    padding-bottom:0;
}

work for me - see demo

HTML

<div class="ui-widget">
    <label for="tags">Tags: </label>
    <input id="tags">
    <input type="submit" value="Go">
</div>

JavaScript

var availableTags = ['Demo'];
$('#tags').autocomplete({
    source: availableTags
});

$('input:submit').button();

(obviously needs jQuery and jQueryUI libraries as well).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜