I have a list of strings that I would like to display in a select HTML object. The lines look something like this:
id - name - description
I would like the fields to align. In PHP, I use
sprintf ("%4s%10s%20s", $id, $name, $description);
which works great. The problem is that multiple spaces are condensed to 1 space in the selection list. I tried to use the CSS pre and white-space CSS properties in the select box, but this has no effect. Any suggestions?
source
share