Kishor Kumar
Kishor Kumar

Reputation: 543

HTML Listbox width when length is zero

I am trying to fill options into a listbox dynamically. I want to set a fixed width even there is no elements in it. Any help is appreciated.

Upvotes: 2

Views: 2252

Answers (1)

user898741
user898741

Reputation:

Use CSS to do this, since there's no html attribute that changes auto width of this object:

<select style="width: 300px">

Simple example.

Upvotes: 3

Related Questions