简体   繁体   English

如何更改下拉菜单的样式

[英]How to change style of dropdown menu

I have a dropdown menu that I just can't figure out how to change... 我有一个下拉菜单,我只是想不出如何更改...

You can see it by going to http://www.escalatehosting.com/signup and entering any domain name and then selecting to continue after choosing a billing cycle. 您可以访问http://www.escalatehosting.com/signup并输入任何域名,然后在选择结算周期后选择继续,以查看此信息。

On the registration form you'll be able to see the dropdown menu is fancy looking for the "Country" option. 在注册表格上,您会看到下拉菜单非常适合寻找“国家/地区”选项。 I'm trying to do the same thing for the "State/Region" dropdown but can't figure out what to change... 我正在尝试对“州/地区”下拉菜单执行相同的操作,但无法找出要更改的内容...

Here is the code being used for the registration form: 这是用于注册表的代码:

<tr><td class="fieldlabel">{$LANG.clientareafirstname}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.firstname}{else}<input type="text" name="firstname" tabindex="1" style="width:300px;" value="{$clientsdetails.firstname}" />{/if}</td><td class="fieldlabel">{$LANG.clientareaaddress1}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.address1}{else}<input type="text" name="address1" tabindex="7" style="width:300px;" value="{$clientsdetails.address1}" />{/if}</td></tr>
<tr><td class="fieldlabel">{$LANG.clientarealastname}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.lastname}{else}<input type="text" name="lastname" tabindex="2" style="width:300px;" value="{$clientsdetails.lastname}" />{/if}</td><td class="fieldlabel">{$LANG.clientareaaddress2}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.address2}{else}<input type="text" name="address2" tabindex="8" style="width:300px;" value="{$clientsdetails.address2}" />{/if}</td></tr>
<tr><td class="fieldlabel">{$LANG.clientareacompanyname}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.companyname}{else}<input type="text" name="companyname" tabindex="3" style="width:300px;" value="{$clientsdetails.companyname}" />{/if}</td><td class="fieldlabel">{$LANG.clientareacity}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.city}{else}<input type="text" name="city" tabindex="9" style="width:300px;" value="{$clientsdetails.city}" />{/if}</td></tr>
<tr><td class="fieldlabel">{$LANG.clientareaemail}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.email}{else}<input type="text" name="email" tabindex="4" style="width:300px;" value="{$clientsdetails.email}" />{/if}</td><td class="fieldlabel">{$LANG.clientareastate}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.state}{else}<input type="text" name="state" tabindex="10" style="width:300px;" value="{$clientsdetails.state}" />{/if}</td></tr>
<tr>{if !$loggedin}<td class="fieldlabel">{$LANG.clientareapassword}</td><td class="fieldarea"><input type="password" name="password" tabindex="5" id="newpw" style="width:300px;" value="{$password}" /></td>{else}<td class="fieldlabel"></td><td class="fieldarea"></td>{/if}<td class="fieldlabel">{$LANG.clientareapostcode}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.postcode}{else}<input type="text" name="postcode" tabindex="11" style="width:300px;" value="{$clientsdetails.postcode}" />{/if}</td></tr>
<tr>{if !$loggedin}<td class="fieldlabel">{$LANG.clientareaconfirmpassword}</td><td class="fieldarea"><input type="password" name="password2" tabindex="6" style="width:300px;" value="{$password2}" /></td>{else}<td class="fieldlabel"></td><td class="fieldarea"></td>{/if}<td class="fieldlabel">{$LANG.clientareacountry}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.country}{else}{$clientcountrydropdown|replace:'<select':'<select tabindex="12" style="width:285px;"'}{/if}</td></tr>
<tr><td colspan="2" class="fieldarea">{if !$loggedin}<script language="javascript">showStrengthBar();</script>{/if}</td><td class="fieldlabel">{$LANG.clientareaphonenumber}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.phonenumber}{else}<input type="text" name="phonenumber" tabindex="13" style="width:300px;" value="{$clientsdetails.phonenumber}" />{/if}</td></tr>

This is the code for the Country drop down that looks how I want: 这是“国家/地区”下拉列表的代码,看起来像我想要的:

<td class="fieldlabel">{$LANG.clientareacountry}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.country}{else}{$clientcountrydropdown|replace:'<select':'<select tabindex="12" style="width:285px;"'}{/if}</td>

This is the code that I don't know how to fix for the State dropdown that I don't know how to fix and make it look like the Country dropdown. 这是我不知道如何解决“州”下拉列表的代码,我不知道如何解决并使它看起来像“国家/地区”下拉列表。

<td class="fieldlabel">{$LANG.clientareastate}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.state}{else}<input type="text" name="state" tabindex="10" style="width:300px;" value="{$clientsdetails.state}" />{/if}</td>

Any help with this would be really appreciated... 任何帮助,将不胜感激...

这是一个花哨的引导主题,您的选择选项可以使用此引导选择

The main issue here is that the class "selectboxit-text" is not applied to your state dropdown. 这里的主要问题是类“ selectboxit-text”没有应用于您的状态下拉列表。 I'd recommend checking the css file. 我建议检查css文件。

The style of Country selection uses an ul and li s 国家选择的样式使用ulli

Try using this instead of select and input: <ul> with this class -> class="selectboxit-options dropdown-menu" 尝试使用它代替选择并输入: <ul>与此类-> class="selectboxit-options dropdown-menu"

For the first option item in the list: <li> with this class -> class="selectboxit-option selectboxit-option-first active" 对于列表中的第一个选项: <li>带有此类-> class="selectboxit-option selectboxit-option-first active"

For the other items: <li> with this class -> class="selectboxit-option" 对于其他项目: <li>使用此类-> class="selectboxit-option"

国家/地区下拉列表是通过jQuery生成的,您可以在下拉菜单中使用该类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM