Search code examples
javascriptcsstypehead

Twitter/Typehead suggestion display inline


Is there any option or CSS trick to show typehead suggestions inline ( Like in SO Tags suggestions)?

I tried some css ( display flex, changing width ), but not worked as i expected.

This is the current result,

Fiddle

enter image description here

I need to make it like this

enter image description here

Thank you


Solution

  • This can be done by simple css. Suggestions are contained in tt-menu > tt-dataset div. You can change the width and set tt-dataset div's display:flex

    .tt-menu{
      width: 500 !important;
    }
    
    .tt-dataset{
      display:flex;
    }