Html twitter typeahead js 100%宽度

Html twitter typeahead js 100%宽度,html,css,typeahead.js,Html,Css,Typeahead.js,我正在尝试更改twitter typeahead js的宽度,但是即使我将宽度设置为100%!重要信息它不会扩展到100%。如果我在px中声明宽度,它就工作了。有人知道吗? 这是演示 这个解决方案怎么样 您只需要微调在实际项目中使用的模板的宽度。我把它改编成小提琴 <input id="states" type="text" class="typeahead"> /** Added from this point */ .twitter-typeahead{ widt

我正在尝试更改twitter typeahead js的宽度,但是即使我将宽度设置为100%!重要信息它不会扩展到
100%
。如果我在px中声明宽度,它就工作了。有人知道吗? 这是演示


这个解决方案怎么样

您只需要微调在实际项目中使用的模板的宽度。我把它改编成小提琴

<input id="states" type="text" class="typeahead">
/** Added from this point */
.twitter-typeahead{
     width: 97%;
}
.tt-dropdown-menu{
    width: 102%;
}
input.typeahead.tt-query{ /* This is optional */
    width: 300px !important;
}