Maintaining white space in html select tag
- by Marius
Hi,
I have a list of strings that I would like to display in a HTML select object. The strings look something like :
id - name - description
I would like the fields to align however. In PHP I'm using
sprintf ("%4s%10s%20s", $id, $name, $description);
which works fine. The problem is the multiple spaces is compacted to 1 space in the select list. I tried using the pre and white-space CSS properties of the select box, but it has no effect. Any suggestions?