Align UL (result) with input (filter)

Asked

Viewed 40 times

-1

I’m doing a filter search, when the user type, will appear the results in a UL. The UL (where it shows the filter results) is not aligned with the input. Follow an image to get an idea:

inserir a descrição da imagem aqui

Any idea?

And another question: the results in UL are not appearing in IE. How to solve?

Follows the code: https://jsfiddle.net/marcelpsaraiva/p40vxdmL/

1 answer

0

In your code CSS, where is the #list-options, instead of width:100%, replace with width:563px;. This way you can change the field size with as many pixels as you want the field to have. Follow the corrected code below:

  #lista-opcoes { 
        list-style-type: none;
        padding: 0;
        /*margin: 0;*/
        position: absolute;
        margin-top: 27px;
        margin-bottom: 0;
        margin-right: 0;
        margin-left: 0;
        width:563px;
      }

It follows image of how it looked:

inserir a descrição da imagem aqui

  • Igor, I would not like to limit the field. The idea is that both the filter field and UL (list-options) are 100% width and aligned.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.