I have a select tag which has options containing three strings- Some name,a '-' and Description. I want all the name strings to take up the same amount of width in the drop down list like below.
abc - abchsdklksd abcdfe - akdskdfsaljdfsklfdjf sag - sdalkjdfjfl
But now it is displaying like below.
abc - abcdadskljf abcdfe - akdskdfsaljdfsklfdjf sag - sdalkjdfjfl
I am getting all those names and descriptions from a java function(JSP). I used string.format function to pad the names with appropriate spaces but it is of no use since different characters take different amount of width. How can I implement this?