Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

twitter typeahead js 100% width

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

<input id="states" type="text" class="typeahead">
like image 750
user3006683 Avatar asked Feb 13 '23 23:02

user3006683


1 Answers

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'll just need to fine tune the widths to the template you are using in the real project. I adapted it to fiddle iframe.

like image 53
D. Melo Avatar answered Feb 24 '23 15:02

D. Melo