Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using Jquerymobile UI for my mobile application. In this application i have one drop down menu, its values are loaded from DB dynamically..Some values are large so Drop down size changes according to the value length.It gives My UI design bad look. How to set Fixed width to Select menu,

I have tried the by css,but not working

select
{
widht:150px; !important
}


very similar to this problem: http://stackoverflow.com/q/12119572/2802020[^]


any other idea???


My code:

XML
<table align="center" cellpadding="0px" cellspacing="0px" style="width: 100%; background-color: White;padding: 15px">
         <tr>

             <td width="70%;" style="border-bottom: 1px solid #837B6C;">

       <span style="font-family: Helvetica; font-size: 12px; color: #837B6C;    margin-left: 10px;">
        Item:</span>
         <select id="ddItem" style="width:100%; border:1px solid            #000;color:#000000; font-family:Georgia,serif;" data-theme="a" data-mini="true" data-inline="true">
                                             <option value="dd">sfdgsdfgsdfyurt6yueryturtyurtyuserytwsrthyserthsdth</option>
                                             <option value="dd"&       gt;5367345634562345623452345</option>
                                             <option value="dd">SFSSDCSDFxdghdfg</option>
                                             <option value="dd">S$FVDE%#Vaert</option>
                                             <option value="dd">HG#%#$@@34343dfghdfgh</option>
                                       </select>

                                </td>

                                <td width="30%" style="border-bottom: 1px solid #837B6C;">

                                                <span style="font-family: Helvetica; font-size: 12px; color: #837B6C; margin-left: 10px;">
                                                    Quantity:</span>

                                                <input name="" id="Text4" placeholder="" value="" data-mini="true" />

        </td>
    </tr>
</table>
Posted
Updated 3-Nov-13 23:07pm
v6

1 solution

Instead of using

I modified the codes with


And it worked good.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900