Struts help needed in Increasing the width of the options tag

I wanted to display the options tag with three values parted by speces. Here is my jsp
<html:select property="selReleaseId" name="planForm">
                  <html:option value="" >First                  Second                     Third </html:option>
                  <html:optionsCollection name="planningForm" property="ftaRelease" value="respectiveId" label="label"/>  
I wanted it to show exactly with first after some spaces then second and then third. Also I tried creating the lavel by appending same values and spaces but it is still removing the spaces and showing. Can any one help me to fix this..

Who is Participating?
boonlengConnect With a Mentor Commented:
You can set the attribute "filter" to false to disable url encoding.
<html:optionsCollection ... filter="false"/>  
Use non-breaking space to avoid browser removing leading/trailing white space.
<html:option value="">First &nbsp;&nbsp;&nbsp;&nbsp; Second &nbsp;&nbsp;&nbsp;&nbsp; Third</html:option>

Boon Leng
json123Author Commented:
Hi Boon Leng,
I tried that but it is showing in the drop down as &nbps; itself. IT is showing exactly like  First &nbsp;&nbsp;&nbsp;&nbsp; Second &nbsp;&nbsp;&nbsp;&nbsp; Third  . It is not substituting the spaces.

Thanks for your replay
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

json123Author Commented:
Thanks Boon  It was my are right it is working now thanks for the solution.
json123Author Commented:
header is good now but for the result , I appended all three fields in my bean and tried to adjust the space there, that is where I am getting the &nbsp displayed. I put a method into bean called getLabel and that will append all those First second and third field and display to the Options. But how can I get spaces there. Is there any other way like I could achieve this?  Thanks for all your help
json123Author Commented:
Thank you so much Boon it worked...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.