Raja
Raja

Reputation: 792

HTML select option multiline value

I have select and option tags in my HTML page.

<select>
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
  <option value="Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock.">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock.</option>
</select>

My last option has a big text retrieving from database and it is bigger than the select box.

Is it possible to make this <option> value double line or multi line by CSS or Javascript like below ?

Option Select

I found this but I could not understand.

UPDATE:

Somebody marked my question as already answered here. But this link is not working.

I can limit my character count by sql query. But this is not the solution.

Upvotes: 4

Views: 10141

Answers (2)

Anwar Hussain
Anwar Hussain

Reputation: 450

Please try jQuery-Selectric this plugin which possibly solve your issue.

Upvotes: 2

VaMoose
VaMoose

Reputation: 196

Nope it is not possible with the standard option tag. Try plugin menu's, there are tons. like this

Upvotes: 0

Related Questions