HTML/CSS datalist

Hi there. Can you please advice me where is my mistake that datalist window is smaller than input field length?

<form>

  <input type="text" list="Countries" />

  <datalist id="Countries">

    <option>Armenia</option>

    <option>Greece</option>

    <option>Croatia</option>

    <option>United States</option>

  </datalist>

</form>
1 Like

The code you posted is fine. The issue must be somewhere else.

1 Like

Thanks. I will try to find out :slight_smile:

Hello Sam Can you solve my query which I posted few days ago about Build for Production

Hello Cap,
It is a question posted last year, but it might be useful for others looking to fix this problem, as I have the same
It took me a lot of time to figure it out, but following Stack Overflow

Seems is impossible to do, as it is the browser deciding the dimension of this drop-down suggestion if you are using the data list function

The <datalist> element is very inflexible - you cannot style it at all as its styling comes from the browser and the browser only.

The code you posted is very fine. Maybe is from somewhere else.