Honor Whitespace padding to display columns in fixed width <select>

Posted by Laramie on Stack Overflow See other posts from Stack Overflow or by Laramie
Published on 2010-05-17T06:59:32Z Indexed on 2010/05/17 7:20 UTC
Read the original article Hit count: 339

I am trying to create the effect of columns in a dropdown by padding text with whitespace as in this example:

<select style="font-family: courier;">
<option value="1">[Aux1+1] [*]  [Aux1+1]              [@Tn=PP] </option>
<option value="2">[Main]   [*]  [Main Apples Oranges] [@Fu=$p] </option>
<option value="3">[Main]   [*]  [Next NP]             [@Fu=n]  </option>
<option value="4">[Main]   [Dr] [Main]                [@Ty=$p] </option>
</select>

According to this blog, it's possible.

The problem is the whitespace is contracted so that the columsn don't line up. SAme results in FF, IE6 and Chrome.

What am I missing?

© Stack Overflow or respective owner

Related posts about select

Related posts about dropdownlist