LA_
LA_

Reputation: 20409

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:

example

Upvotes: 1

Views: 1082

Answers (1)

andyb
andyb

Reputation: 43823

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).

Upvotes: 1

Related Questions