Is it possible to create a table in the <select> tag?

I am looking to create a select statement in which each parameter contains the quantity and price for the item we are selling. I thought that I would create a table where for each row the quantity will be in one, and the price will be in another. I can't seem to get this to work on the select command. I also tried using tags with float-right and float-left, and that didn't work either. Does anyone have any ideas?

+3
source share
4 answers

You cannot do this with plain vanilla HTML. You will need to understand Javascript to simulate such a dropdown using other HTML elements and a good CSS snapshot. You can get some ideas here that anything is possible with good JS (actually jQuery ) and CSS.

+2
source

One thing I did with plain html is just to add the appropriate amount &nbsp;to set everything up correctly. JavaScript is probably the best way.

+1
source

HTML - javascript.

0

.

-

<select name="..">

<option value="1">1 item for xx price</option>
<option value="2">2 items for xxx price</option>
....
<option value="5">5 item for xxxx price</option>

</select>
0

Source: https://habr.com/ru/post/1727898/


All Articles