Twitter typeahead js 100% width

I am trying to change the width of the twart typeahead js, but even if I put it width:100% !important, it does not apply to 100%. If I declare a width in px, it works. Does anyone have any ideas? Here is a demo of http://jsfiddle.net/uuzVN/

<input id="states" type="text" class="typeahead">
+4
source share
1 answer

What about this solution ?: http://jsfiddle.net/uuzVN/2/

/** Added from this point */
.twitter-typeahead{
     width: 97%;
}
.tt-dropdown-menu{
    width: 102%;
}
input.typeahead.tt-query{ /* This is optional */
    width: 300px !important;
}

You just need to fine tune the width to the template that you are using in a real project. I adapted it for the iframe violin.

+8
source

Source: https://habr.com/ru/post/1523656/


All Articles