tags:

views:

72

answers:

4

I'm looking to create a select statement where each option contains quantity and price for an item we're selling. I thought I would create a table where for every row, quantity would be in one , and price would be in the other . I can't seem to get this to work in a select statement. I also tried using tags with a float-right and float-left and this didn't work either. Anyone have any ideas?

+2  A: 

You can't do this with plain vanilla HTML. You'll need to grasp Javascript to mimic such a dropdown with help of other HTML elements and a good shot of CSS. You can get here some ideas what's all possible with good JS (actually, jQuery) and CSS code.

BalusC
A: 

You can't do this in plain HTML - you'd have to look at a javascript combo box replacement.

Erik
A combobox is not the same as a dropdown. A combobox is an editable dropdown.
BalusC
+1  A: 

One thing I've done with plain html is to just add the appropriate number of   to line everything up correctly. JavaScript is probably the better way to go though.

Jay Askren
you would also need to use a fixed-width font to make this work ..
Gaby
This would certainly be a good way to render the basic markup version, before ‘progressive enhancement’.
bobince
A: 

As an alternative to the above answers, you could just make the text of the options to make sense as english ..

something like

<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>
Gaby